]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-event: Clean up SIGCHLD conditions for sd_event_add_child()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 18 Dec 2025 09:30:36 +0000 (10:30 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 20 Dec 2025 14:27:22 +0000 (15:27 +0100)
commita1e5d7f865cfd157be26b11c62efe33dcaefc219
treefd882d6505f1eafd1b18ee36996d6b3365317006
parent20367ade71b2eca917b1525c9aad2d700a8fef56
sd-event: Clean up SIGCHLD conditions for sd_event_add_child()

First, don't require blocking SIGCHLD for WEXITED. We watch for WEXITED
via pidfd instead of signalfd, so no need to insist on blocking SIGCHLD
anymore if we're only watching for WEXITED.

Second, do a proper check to see if the kernel autoreaping logic is
enabled. That has nothing to do with SIGCHLD being blocked for the current
thread or not. Instead, the kernel autoreaping logic is enabled either if
the disposition is set to SIG_IGN or if the SA_NOCLDWAIT flag is enabled.
TODO
man/event-quick-child.c
man/sd_event_add_child.xml
src/basic/signal-util.c
src/basic/signal-util.h
src/libsystemd/sd-event/sd-event.c
src/libsystemd/sd-event/test-event.c