summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-05-18 17:07:04 +0200
committerTom Gundersen <teg@jklm.no>2015-05-18 23:49:35 +0200
commitf29328d6557f1ebb3df5c0b491fb3dd3d970d356 (patch)
tree9be3c456dfe22c3c9e142da94f18d62e330fc2ae /src/udev
parentb2d21d9318497517519956ab9994f2303aa0223e (diff)
udevd: process all SIGCHLD events every time the handler is invoked
We were returning rather than continuing in some cases. The intention was always to fully process all pending events before returning from the SIGCHLD handler. Restore this behaviour.
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/udevd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 892637f052..a9e82de4cd 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1042,12 +1042,12 @@ static int on_sigchld(sd_event_source *s, const struct signalfd_siginfo *si, voi
pid = waitpid(-1, &status, WNOHANG);
if (pid <= 0)
- return 1;
+ break;
worker = hashmap_get(manager->workers, UINT_TO_PTR(pid));
if (!worker) {
log_warning("worker ["PID_FMT"] is unknown, ignoring", pid);
- return 1;
+ continue;
}
if (WIFEXITED(status)) {
@@ -1059,10 +1059,10 @@ static int on_sigchld(sd_event_source *s, const struct signalfd_siginfo *si, voi
log_warning("worker ["PID_FMT"] terminated by signal %i (%s)", pid, WTERMSIG(status), strsignal(WTERMSIG(status)));
} else if (WIFSTOPPED(status)) {
log_info("worker ["PID_FMT"] stopped", pid);
- return 1;
+ continue;
} else if (WIFCONTINUED(status)) {
log_info("worker ["PID_FMT"] continued", pid);
- return 1;
+ continue;
} else
log_warning("worker ["PID_FMT"] exit with status 0x%04x", pid, status);