Messages in this thread |  | | Date | Fri, 7 Jun 1996 10:22:58 -0600 (MDT) | From | Marc Aurele La France <> | Subject | Re: On SIGCHLD signal semantics |
| |
On Tue, 4 Jun 1996, Tim Wright wrote:
> > Thus there's a timing problem when the parent's SIGCHLD handler is > > SIG_IGN. A wait call by the parent will return one of two things:
> > -ECHILD, if the child exits before the parent's wait call; or > > the child's pid, if the child exits while the parent is waiting.
> Whoops ! > If this is the behaviour, then it's broken in that it violates the principle of > least surprise.
> BSD always generates zombies and wait() always succeeds, regardless of the > disposition of SIGCHLD. > System V introduced some very dubious semantics where if the disposition of > SIGCLD (aliased by SIGCHLD in SVR4) is explicitly set to ignore, *no* zombies > are *ever* generated and wait() will suspend execution until all children have > exited then return ECHILD. This behaviour was documented as being "unstable" > or subject to change in SVR2, but is still around in SVR4 and unlikely to > change now.
For what it's worth, I don't think System V's behaviour is so "dubious". It seems the System V folks were trying to address BSD's apparent process table bloat when a parent never calls wait.
BTW, pardon my ignorance, but what exactly do expiring children turn into if not zombies (in System V)?
Marc.
+----------------------------------+-----------------------------------+ | Marc Aurele La France | work: 1-403-492-9310 | | Computing and Network Services | fax: 1-403-492-1729 | | 352 General Services Building | email: tsi@ualberta.ca | | University of Alberta +-----------------------------------+ | Edmonton, Alberta | | | T6G 2H1 | Standard disclaimers apply | | CANADA | | +----------------------------------+-----------------------------------+
|  |