Typical Usage:
use POSIX ':sys_wait_h';
Mountain information in perldoc -f fork , waitpid , wait , kill , and perlipc . The material in perlipc about setting up the SIGCHLD event handler should be especially useful, although this is not supported on Windows.
Branched-process I / O is generally safe for Unix and Windows. File descriptors are split, so for something like this
open X, ">", $file; if (fork() == 0) {
both child and parent processes will be successfully written to the same file (however, be sure to buffer output).
source share