From: Steve Langasek Date: Sat, 8 Oct 2011 09:14:09 +0000 (-0700) Subject: udevd: exit - process events before signals in worker X-Git-Tag: 174~10 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7944a13a2b8516d5fa354703789f5988cb4299b6;p=systemd udevd: exit - process events before signals in worker When a worker receives both a signal and a udev event in the same epoll_wait run, the event must be processed first because the udev parent considers the event already dispatched. If we process the signal first and exit, udevd times out after 60 seconds waiting for a response from an already-dead worker. Ref: https://bugs.launchpad.net/bugs/818177 Signed-off-by: Steve Langasek --- diff --git a/udev/udevd.c b/udev/udevd.c index 77aec9d2..b65b53f7 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -347,6 +347,7 @@ static void worker_new(struct event *event) for (i = 0; i < fdcount; i++) { if (ev[i].data.fd == fd_monitor && ev[i].events & EPOLLIN) { dev = udev_monitor_receive_device(worker_monitor); + break; } else if (ev[i].data.fd == fd_signal && ev[i].events & EPOLLIN) { struct signalfd_siginfo fdsi; ssize_t size;