On Tue, Jul 26, 2022 at 09:15:30PM +0100, Chris Down wrote:
> - /* clean up any zombies immediately */
> - sigchld(0);
> + if (sigaction(SIGCHLD, &sc, NULL)) {
> + perror("sigaction");
> + exit(EXIT_FAILURE);
> + }
Not too well versed on `sigaction` but what happens to any zombies
*before* the sigaction call? Don't we need to clean those up?
Also `die` already calls perror, could just use:
if (sigaction(SIGCHLD, &sc, NULL) < 0)
die("sigaction failed:");
The comparison against 0 is mostly personal, but the suckless coding
style recommends it as well:
https://suckless.org/coding_style/
- NRK
Received on Tue Jul 26 2022 - 22:36:02 CEST