in reply to New Child to Wait for First Child to Die
The `normal' approach to reap children is to use:
while (defined (my $rc = waitpid(-1, &WNOHANG))) { #some child has finished }
Check the perlfunc:waitpid man page for more.
$h=$ENV{HOME};my@q=split/\n\n/,`cat $h/.quotes`;$s="$h/." ."signature";$t=`cat $s`;print$t,"\n",$q[rand($#q)],"\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: New Child to Wait for First Child to Die
by spike_hodge (Novice) on Apr 24, 2003 at 09:16 UTC |