mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 00:51:24 +03:00
udevd: worker - warn if unknown worker returns
This commit is contained in:
parent
979558f322
commit
c0bbfd72e7
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user