From 210f90af1d2f4a644ddc2a715c0b5145a0831748 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Fri, 24 Apr 2015 18:04:57 +0200 Subject: udevd: warn if we receive SIGCHLD from untracked worker Signed-off-by: Anthony G. Basile --- src/udev/udevd.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 97e8fa9e4b..6d0b8f89a5 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -854,6 +854,7 @@ static void handle_signal(struct udev *udev, int signo) { pid_t pid; int status; struct udev_list_node *loop, *tmp; + bool found = false; pid = waitpid(-1, &status, WNOHANG); if (pid <= 0) @@ -864,6 +865,8 @@ static void handle_signal(struct udev *udev, int signo) { if (worker->pid != pid) continue; + else + found = true; if (WIFEXITED(status)) { if (WEXITSTATUS(status) == 0) @@ -900,6 +903,9 @@ static void handle_signal(struct udev *udev, int signo) { worker_unref(worker); break; } + + if (!found) + log_warning("worker ["PID_FMT"] is unknown, ignoring", pid); } break; case SIGHUP: -- cgit v1.2.3-54-g00ecf