summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
Diffstat (limited to 'udev')
-rw-r--r--udev/udevd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/udev/udevd.c b/udev/udevd.c
index b2e4a022c5..cfb8823f4c 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -328,8 +328,9 @@ static void event_run(struct event *event)
event->state = EVENT_RUNNING;
count = udev_monitor_send_device(monitor, worker->monitor, event->dev);
if (count < 0) {
- err(event->udev, "worker [%u] did not accept message, kill it\n", worker->pid);
event->state = EVENT_QUEUED;
+ worker->event = NULL;
+ err(event->udev, "worker [%u] did not accept message %zi (%m), kill it\n", worker->pid, count);
worker->state = WORKER_KILLED;
kill(worker->pid, SIGKILL);
continue;
@@ -521,6 +522,9 @@ static void worker_returned(void)
if (worker->pid != msg.pid)
continue;
+ if (worker->state != WORKER_RUNNING)
+ break;
+
/* worker returned */
worker->event->exitcode = msg.exitcode;
event_queue_delete(worker->event);