From f648820cb158526d3c3e16f712206316f2112b7e Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Fri, 30 Oct 1998 21:08:11 +0000 Subject: mention the C<$SIG{CHLD} = 'IGNORE'> special case p4raw-id: //depot/perl@2152 --- pod/perlipc.pod | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'pod/perlipc.pod') diff --git a/pod/perlipc.pod b/pod/perlipc.pod index cc2a1a9d81..c74c520637 100644 --- a/pod/perlipc.pod +++ b/pod/perlipc.pod @@ -56,7 +56,17 @@ So to check whether signal 17 and SIGALRM were the same, do just this: You may also choose to assign the strings C<'IGNORE'> or C<'DEFAULT'> as the handler, in which case Perl will try to discard the signal or do the -default thing. Some signals can be neither trapped nor ignored, such as +default thing. + +On most UNIX platforms, the C (sometimes also known as C) signal +has special behavior with respect to a value of C<'IGNORE'>. +Setting C<$SIG{CHLD}> to C<'IGNORE'> on such a platform has the effect of +not creating zombie processes when the parent process fails to C +on its child processes (i.e. child processes are automatically reaped). +Calling C with C<$SIG{CHLD}> set to C<'IGNORE'> usually returns +C<-1> on such platforms. + +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 automatically restored once your block is exited. (Remember that local() -- cgit v1.2.1