From c0bbfd72e7437f8b2e6d64efa56f2705fceb0fcc Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Fri, 24 Apr 2015 19:29:53 +0200 Subject: [PATCH] udevd: worker - warn if unknown worker returns --- src/udev/udevd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 27caaf14a03..339e9c45709 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -615,6 +615,7 @@ static void worker_returned(int fd_worker) { ssize_t size; struct ucred *ucred = NULL; struct udev_list_node *loop; + bool found = false; size = recvmsg(fd_worker, &msghdr, MSG_DONTWAIT); if (size < 0) { @@ -646,6 +647,8 @@ static void worker_returned(int fd_worker) { if (worker->pid != ucred->pid) continue; + else + found = true; /* worker returned */ if (worker->event) { @@ -658,6 +661,9 @@ static void worker_returned(int fd_worker) { worker_unref(worker); break; } + + if (!found) + log_warning("unknown worker ["PID_FMT"] returned", ucred->pid); } }