30996 pts/0 S 0:00 \_ perl -w ./us2.pl
32396 pts/0 S 0:00 \_ perl -w ./us2.pl
32451 pts/0 R 0:00 | \_ perl -w ./us2.pl
32443 pts/0 S 0:00 \_ perl -w ./us2.pl
32450 pts/0 R 0:00 \_ perl -w ./us2.pl
####
831 pts/0 R 0:28 \_ perl -w ./us2.pl
1745 pts/0 S 0:00 \_ perl -w ./us2.pl
1776 pts/0 R 0:00 \_ perl -w ./us2.pl
####
use POSIX ":sys_wait_h";
sub REAPER {
my $child;
while (($child = waitpid(-1,WNOHANG)) > 0) {
$Kid_Status{$child} = $?;
}
$SIG{CHLD} = \&REAPER; # still loathe sysV
}
$SIG{CHLD} = \&REAPER;
# do something that forks...
####
--
Daniellek