develooper Front page | perl.perl5.porters | Postings from February 2007

Re: system() behavior with $SIG{CHLD} = IGNORE (was Re: [perl #36976])

Thread Previous | Thread Next
From:
David Nicol
Date:
February 5, 2007 11:16
Subject:
Re: system() behavior with $SIG{CHLD} = IGNORE (was Re: [perl #36976])
Message ID:
934f64a20702051115i60247abdp2cc7db5cf3c7c51c@mail.gmail.com
> > So perl is behaving exactly like the underlying system call.  Sorry
> > for any confusion.
> >
> > --
> > Rick Delaney
> > rick@bort.ca

the situation as described seems to me highly sub-optimal.  Here's a note
to include in perlipc to document the situation:



--- perlipc.pod.orig    2007-02-05 13:09:29.000000000 -0600
+++ perlipc.pod 2007-02-05 13:13:18.000000000 -0600
@@ -69,6 +69,10 @@
 Calling C<wait()> with C<$SIG{CHLD}> set to C<'IGNORE'> usually returns
 C<-1> on such platforms.

+Perl program control flow on
+some BSD platforms will not return from C<system()> or backticks invocation
+until all child processes have ended, when C<$SIG{CHLD}> is set to C<'IGNORE'>.
+
 Some signals can be neither trapped nor ignored, such as
 the KILL and STOP (but not the TSTP) signals.  One strategy for
 temporarily ignoring signals is to use a local() statement, which will be

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About