summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-04-24 18:04:57 +0200
committerTom Gundersen <teg@jklm.no>2015-04-24 19:13:48 +0200
commitd1317d02e637e19e9f40175657ff8e6098523633 (patch)
tree9fdae7c5463e5cdbe35492098e1cb004e74493b9 /src/udev
parent70a93737ecd613d9b5855cb5d7c80829b966ec6a (diff)
udevd: warn if we receive SIGCHLD from untracked worker
Diffstat (limited to 'src/udev')
-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 60e1ee6f9e..6b5d99b6b0 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -859,6 +859,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)
@@ -869,6 +870,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)
@@ -905,6 +908,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: