summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-04-24 18:04:57 +0200
committerAnthony G. Basile <blueness@gentoo.org>2015-05-03 15:28:25 -0400
commit210f90af1d2f4a644ddc2a715c0b5145a0831748 (patch)
treee065fb9cddb648d174fd979954e056ddb1487c48
parent29af2fd71d66c574b4d5d9b9249c854ced30676b (diff)
udevd: warn if we receive SIGCHLD from untracked worker
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r--src/udev/udevd.c6
1 files changed, 6 insertions, 0 deletions
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: