New? idea
gwyn%brl-vld at sri-unix.UUCP
gwyn%brl-vld at sri-unix.UUCP
Wed Jan 18 00:28:16 AEST 1984
From: Doug Gwyn (VLD/VMB) <gwyn at brl-vld>
One thing you didn't mention is that wait(2) will block until all
children have terminated under UNIX System V if SIGCLD is set to
SIG_IGN.
On 4.1cBSD at least, setting the handler for SIGCHLD to SIG_IGN was
NOT the same as setting it to SIG_DFL in that this state was
detectable by user code as a non-default mode. I found this out
the hard way when my wait(2) emulation for UNIX System V on 4.1cBSD
went into a loop when emulated code was run by csh or telnetd users.
Turns out csh and telnetd were sloppy about resetting SIGCHLD and
had set it to SIG_IGN by mistake. The 4.1cBSD manual had more
information about this than the 4.2BSD manual seems to have.
I urge people to set SIGCHLD to SIG_DFL if they want it totally
ignored, since SIG_IGN has different semantics for UNIX System V
programs.
More information about the Comp.unix.wizards
mailing list