> If the signal(2) call within the signal handler fails, die() is called
> which in turn is not signal-safe. Therefore, the change to sigaction
> makes dwm() more portable among POSIX systems and fixes a signal race
> condition.

You are right with the original race condition, but I think your solution
has also a race condition, because you are not blocking signals while
you are in the handler. From my point of view what should be done here
is simply:

        signal(SIGCHLD, SIG_IGN);

It will avoid zombie children.

Regards,


Reply via email to