]> git.ipfire.org Git - thirdparty/systemd.git/commit
udev: do not wait for event queue being empty on exit
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 5 Apr 2025 17:04:06 +0000 (02:04 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 7 Apr 2025 13:17:16 +0000 (22:17 +0900)
commit45e8c283d87614cddc7ff23371b3e2701bd386cd
tree9813b222fd1a5922af4928ceff63f812d97ccde3
parentb6ede8e2756ebaf5049f9975f4cde81445578fd2
udev: do not wait for event queue being empty on exit

When the manager process is requested to terminate, if a worker process
try to lock a block device and failed, then the worker returns a
TRY_AGAIN notification and the event is requeued. Hence, the event queue
may have pending events even after manager_exit() is called. In such
situation, sd_event_exit() will never called, and udevd will stuck.

This makes, after termination is requested, it only checks whether there
are any events currently being processed.
src/udev/udev-manager.c