bug fix in SIGCHLD