prefork: Fix 100% CPU usage in parent process
prefork: Fix 100% CPU usage in parent process

When a child process is terminated, the parent calls waitpid() to check
for dead children. This returns -1 on error (e.g. there are no other
children or a signal interrupted waitpid()), the pid (> 0) for dead
children OR 0 if there are some children which are still alive.

Fixes gnosek/fcgiwrap#18.

muthhus/fcgiwrap,gnosek/fcgiwrap,samboy/fcgiwrap,samboy/fcgiwrap