nkx has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl ….. my @children = (); …… sub mysub { my $pid = fork(); if ($pid) { push(@children, $pid); } if( $pid == 0 ){ # child process code here exit 0; } } …… foreach (@children) { waitpid($_, 0); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: fork() and wiatpid() quirk on RHEL AS 4 and PERL version 5.8.5
by jeffa (Bishop) on Jan 15, 2009 at 18:41 UTC | |
by JavaFan (Canon) on Jan 15, 2009 at 18:48 UTC | |
by nkx (Initiate) on Jan 15, 2009 at 19:44 UTC | |
by nkx (Initiate) on Jan 21, 2009 at 18:06 UTC |