Re: [hackers] Re: [dwm][PATCH v2] Use sigaction(SA_NOCLDWAIT) for SIGCHLD handling

From: Chris Down <chris_AT_chrisdown.name>
Date: Tue, 24 Jan 2023 20:07:25 +0000

Hiltjo Posthuma writes:
>- sigchld(0);
>+ if (signal(SIGCHLD, SIG_IGN) == SIG_ERR)
>+ die("can't ignore SIGCHLD:");

I didn't test it yet, so maybe I'm misremembering/misreading the patch, but I
don't think this will work: SIG_IGN will ignore new children, but it won't
clean up any which are already ready to reap. That's why you need careful
ordering of SIG_IGN and waitpid().
Received on Tue Jan 24 2023 - 21:07:25 CET

This archive was generated by hypermail 2.3.0 : Tue Jan 24 2023 - 21:36:33 CET