From owner-freebsd-ports@FreeBSD.ORG Mon May 24 11:53:26 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5EEAF16A4CE for ; Mon, 24 May 2004 11:53:26 -0700 (PDT) Received: from mx-out.daemonmail.net (mx-out.daemonmail.net [216.104.160.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37AA543D54 for ; Mon, 24 May 2004 11:53:26 -0700 (PDT) (envelope-from chris@tierra.net) Received: from localhost.daemonmail.net (localhost.daemonmail.net [127.0.0.1]) by mx-out.daemonmail.net (8.9.3p2/8.9.3) with SMTP id LAA30076 for ; Mon, 24 May 2004 11:53:20 -0700 (PDT) (envelope-from chris@tierra.net) Received: from [216.104.164.100] (via account tierra.net) by mx-out.daemonmail.net with ESMTP id IEG1l0a5 authenticated by SMTP; Mon, 24 May 2004 11:53:20 -0700 (PDT) Message-Id: <6.0.1.1.2.20040524115230.0332b0f8@mail.tierra.net> X-Sender: chris@mail.tierra.net X-Mailer: QUALCOMM Windows Eudora Version 6.0.1.1 Date: Mon, 24 May 2004 11:53:44 -0700 To: freebsd-ports@freebsd.org From: Chris Samaritoni Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Perl 5.8.2 issue with SIG{CHLD}? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 May 2004 18:53:26 -0000 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.