vr84
December 27th, 2007, 10:27 PM
I was reading about an echo server that forks a child to handle each client. To handle zombies the author said it was correct to use waitpid in a loop within the SIGCHLD signal handler rather than using wait inside the handler because wait blocks. My question is why would wait block, wouldn't it execute right away because it's inside the SIGCHLD handler, implying that a child terminated?