aboutsummaryrefslogtreecommitdiff
path: root/reaper.h (follow)
Commit message (Collapse)AuthorAgeLines
* reaper: add reaper_del() - pid is no longer watched/monitored after thisDaniel Eklöf2021-01-21-0/+1
|
* reaper: add optional callbackDaniel Eklöf2021-01-21-1/+4
| | | | | | | | | When calling ‘reaper_add()’, the caller can provide a callback. If non-NULL, the reaper will call the callback to handle the actual reaping. If the callback is NULL, or if it returns false, the reaper reaps the child process.
* reaper: new module, uses a signalfd to wait() on child processesDaniel Eklöf2020-05-21-0/+12
Use a signalfd to listen for SIGCHLD signals. When we receive a SIGCHLD over the signalfd, reap all dead children by looping over all registered child PIDs and call waitpid(WNOHANG) on them.