waitpid($pid, 1); # It is important to waitpid on your child process, # otherwise zombies could be created.
As an aside, waitpid at the end of a script (as you have it here) is not important or necessary. Nothing bad will happen without it, as the OS will automatically reap any zombies when their parent process has gone away. In other words, zombies can only exist as long as the parent is still alive.
In reply to Re^2: Communicate with child process via stdin, stdout
by Eliya
in thread Communicate with child process via stdin, stdout
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |