libev SIGCHLD handler

Vetoshkin Nikita nikita.vetoshkin at
Thu May 10 13:28:31 CEST 2012

Not sure if this issue was on the list, google suggests nothing.
If I'm not mistaken, upon receiving SIGHCLD libev calls waitpid(-1,
...) only once, which is wrong because multiple SIGCHLDs can be merged
into one if many child processes died while we were in sighandler
So correct SIGCHLD handler should loop calling waitpid() until no zombies exist.
Please, correct me, if I'm wrong.

Nikita Vetoshkin

More information about the libev mailing list