aboutsummaryrefslogtreecommitdiff
path: root/debug.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-02-10 15:22:51 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-02-11 17:55:30 +0000
commit23bc3b217938873f7519dd868309298512af1d41 (patch)
tree9920d99ef172122314d80b60b76a8e5173cf4f09 /debug.h
parentrender: block all signals in the rendering threads (diff)
reaper: monitor SIGCHLD using the FDM instead of via a signalfd
In addition to letting the FDM do the low-level signal watching, this patch also fixes a bug; multiple SIGCHLDs, be it delivered either through a signal, or via a signalfd, can be coalesced, like all signals. This means we need to loop on waitpid() with WNOHANG until there are no more processes to reap. This in turn requires a small change to the way reaper callbacks are implemented. Previously, the callback was allowed to do the wait(). This was signalled back to the reaper through the callback’s return value. Now, since we’ve already wait():ed, the process’ exit status is passed as an argument to the reaper callback. The callback for the client application has been updated accordingly; it sets a flag in the terminal struct, telling term_destroy() that the process has already been wait():ed on, and also stores the exit status.
Diffstat (limited to 'debug.h')
0 files changed, 0 insertions, 0 deletions