fork returns 0 (zero) in the child, and non-zero (pid of the child) in the parent. Since 0 is false in Perl, if ($pid) block will be run by the parent.my $pid = fork(); if ($pid) { # We're the child and we need to start the analysis
In reply to Re: Detached forking in a CGI script
by Anonymous Monk
in thread Detached forking in a CGI script
by xylose
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |