summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-03-11 22:27:46 +0100
committerTom Gundersen <teg@jklm.no>2015-03-12 12:03:50 +0100
commit090b6bc5205b924df4be3239b2f7d9c097fbb705 (patch)
tree2ca59c1e6f76fff25b6be5144d10252612ef6c3c
parent8f0f13f04555d3bc67511d2e334c667cef7e8971 (diff)
udevd: don't free event when killing the worker, wait until it has been reaped
This will allow us to clean up the device when we are notified about the worker being killed.
-rw-r--r--src/udev/udevd.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index c01fb4bb94..9426edca2e 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1414,12 +1414,8 @@ int main(int argc, char *argv[]) {
kill(worker->pid, SIGKILL);
worker->state = WORKER_KILLED;
- /* drop reference taken for state 'running' */
- worker_unref(worker);
log_error("seq %llu '%s' killed", udev_device_get_seqnum(worker->event->dev), worker->event->devpath);
worker->event->exitcode = -64;
- event_queue_delete(worker->event);
- worker->event = NULL;
} else if (!worker->event_warned) {
log_warning("worker ["PID_FMT"] %s is taking a long time", worker->pid, worker->event->devpath);
worker->event_warned = true;