waitwait Waits for a child process to terminate and returns the
pid of the deceased process, or
If you expected a child and didn't find it, you probably had a
call to system, a close on a pipe, or backticks between
the fork and the wait. These constructs also do a
wait(2) and may have harvested your child process.
Use waitpid to avoid this problem. |