1 #include <errno.h> /* error simbol definitions */
2 #include <signal.h> /* signal handling declarations */
8 void HandSIGCHLD(int sig)
13 /* save errno current value */
18 pid = waitpid(WAIT_ANY, &status, WNOHANG);
20 debug("child %d terminated with status %x\n", pid, status);
22 } while ((pid > 0) && (errno == EINTR));
23 /* restore errno value*/