| To: | Michael Kerrisk <mtk.lists@xxxxxxxxx> |
|---|---|
| Subject: | Re: wait() spec (SIGCHLD ignored) |
| From: | Roland McGrath <roland@xxxxxxxxxx> |
| Date: | Mon, 4 Aug 2008 02:55:10 -0700 (PDT) |
| Cc: | austin-group-l@xxxxxxxxxxxxx |
| References: | <1217604384.26163.32.camel@xxxxxx><200808011542.m71Fgc2p002689@xxxxxx><20080801160715.GA14327@xxxxxx><200808011654.m71GsV9i005409@xxxxxx><20080801171355.GA15855@xxxxxx><4896CDE1.9000609@xxxxxx> |
I think you are reading it wrong. In the scenario you described, your previously-terminated child was not transformed into a zombie process. In _exit() and the "Signal Concepts" section, the standard specifies when a process "shall be transformed into a zombie process." It's when its parent didn't use SIG_IGN or SA_NOCLDWAIT for SIGCHLD. The wait() wording means that e.g. if you had SIGCHLD set to SIG_DFL, then had some children die, then subsequently changed SIGCHLD to SIG_IGN and then called wait(), you would get those previously-dead children. However, if SIGCHLD was set to SIG_IGN before any children died, then the clause applies normally--wait() blocks until all are dead, then returns ECHILD. Thanks, Roland |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | wait() spec (SIGCHLD ignored), Michael Kerrisk |
|---|---|
| Next by Date: | Re: wait() spec (SIGCHLD ignored), Michael Kerrisk |
| Previous by Thread: | wait() spec (SIGCHLD ignored), Michael Kerrisk |
| Next by Thread: | Re: wait() spec (SIGCHLD ignored), Michael Kerrisk |
| Indexes: | [Date] [Thread] [All Lists] |