Perl 5.8.2 issue with SIG{CHLD}?

Chris Samaritoni chris at
Mon May 24 11:53:26 PDT 2004


I noticed that the Perl 5.8.2 port isn't handling $SIG{CHLD} signals as 
previous versions have, and wondered if anyone had experienced similar 
problems? This seems to affect both FreeBSD 4.8 and 4.9, here is a simple 
perl script which demonstrates the problem.

Basically, $SIG{CHLD} = 'IGNORE' is supposed to have Perl automatically 
reap zombie children, however it acts as if Perl is never receiving the 
CHLD signal. This code seems to work properly on 5.00503 out of the box, 
just not on 5.8.2 port:

#or: $SIG{CHLD} = sub { wait; };
for (1..10) {
     # fork 10 children which will immediately exit
     my $pid = fork();
     if (!$pid) { exit(); }
     else { print "CHILD: $pid\n"; }
#perl should clean up zombies here automatically:
sleep 5;

#show any remaining zombies (there should be none)
system("ps ax | grep perl");

Thanks for any input.

More information about the freebsd-ports mailing list