teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame 0033-udevd-simplify-sigterm-check.patch

Harald Hoyer fe20ad
From 65a43fc88f420d5be42f6c443ce920c1852f6998 Mon Sep 17 00:00:00 2001
Harald Hoyer fe20ad
From: Kay Sievers <kay@vrfy.org>
Harald Hoyer fe20ad
Date: Thu, 15 Aug 2013 19:51:08 +0200
Harald Hoyer fe20ad
Subject: [PATCH] udevd: simplify sigterm check
Harald Hoyer fe20ad
Harald Hoyer fe20ad
---
Harald Hoyer fe20ad
 src/udev/udevd.c | 8 +++-----
Harald Hoyer fe20ad
 1 file changed, 3 insertions(+), 5 deletions(-)
Harald Hoyer fe20ad
Harald Hoyer fe20ad
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
Harald Hoyer fe20ad
index 7c6c5d6..fd799cc 100644
Harald Hoyer fe20ad
--- a/src/udev/udevd.c
Harald Hoyer fe20ad
+++ b/src/udev/udevd.c
Harald Hoyer fe20ad
@@ -314,13 +314,11 @@ static void worker_new(struct event *event)
Harald Hoyer fe20ad
                         udev_device_unref(dev);
Harald Hoyer fe20ad
                         dev = NULL;
Harald Hoyer fe20ad
 
Harald Hoyer fe20ad
-                        if (udev_event->sigterm) {
Harald Hoyer fe20ad
-                                udev_event_unref(udev_event);
Harald Hoyer fe20ad
-                                goto out;
Harald Hoyer fe20ad
-                        }
Harald Hoyer fe20ad
-
Harald Hoyer fe20ad
                         udev_event_unref(udev_event);
Harald Hoyer fe20ad
 
Harald Hoyer fe20ad
+                        if (udev_event->sigterm)
Harald Hoyer fe20ad
+                                goto out;
Harald Hoyer fe20ad
+
Harald Hoyer fe20ad
                         /* wait for more device messages from main udevd, or term signal */
Harald Hoyer fe20ad
                         while (dev == NULL) {
Harald Hoyer fe20ad
                                 struct epoll_event ev[4];