Date: Mon, 24 May 2004 11:53:44 -0700 From: Chris Samaritoni <chris@tierra.net> To: freebsd-ports@freebsd.org Subject: Perl 5.8.2 issue with SIG{CHLD}? Message-ID: <6.0.1.1.2.20040524115230.0332b0f8@mail.tierra.net>
next in thread | raw e-mail | index | archive | help
Hi, 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: $SIG{CHLD} = 'IGNORE'; #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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6.0.1.1.2.20040524115230.0332b0f8>