Per Mr Igli (igli in ##posix on freenode)

loop while waidpid WNOHANG doesn't return ECHILD instead of
doing an unconditional wait unless WNOHANG is not defined.