summaryrefslogtreecommitdiff
path: root/TODO
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2023-03-11 06:20:07 +0600
committerHiltjo Posthuma <hiltjo@codemadness.org>2023-03-11 13:14:56 +0100
commitfdf5fc7305e86bee82c1d7466d0d74936c135b07 (patch)
tree98020d219126788eef83038cf9caf5b4d527ec36 /TODO
parent41e2b8f30667078a4da04d5bd3d9eb839b118895 (diff)
fix: faulty zombie reaping
issues with the current signal handler: 1. die() isn't async-signal-safe 2. there's a race-window during reinstating the signal handler allowing zombies to be produced (should be rare in practice). 3. if waitpid fails, it will clobber the errno which can lead to undesired codepath being taken on the resuming code (this one can actually occur in practice). to reproduce the 3rd issue: ~> ./tabbed & [1] 20644 0x1800003 ~> while :; do kill -s SIGCHLD 20644; done >&2 2>/dev/null XIO: fatal IO error 10 (No child processes) on X server ":0" after 47 requests (47 known processed) with 0 events remaining. [1] + exit 1 ./tabbed set the signal handler to SIG_IGN to reap zombies automatically (according to POSIX.1-2001). NOTE: this patch follows dwm's commit 712d663. according to the manpage, none of the sa_flags being set are meaningful since we're using SIG_IGN. they used to be meaningful on earlier version of the patch where it was using SIG_DFL, i've kept them here just in case.
Diffstat (limited to 'TODO')
0 files changed, 0 insertions, 0 deletions