Email List: Xaustin-group-lX
[All Lists]

Re: wait() spec (SIGCHLD ignored)

To: Roland McGrath <roland@xxxxxxxxxx>
Subject: Re: wait() spec (SIGCHLD ignored)
From: Michael Kerrisk <mtk.lists@xxxxxxxxx>
Date: Mon, 04 Aug 2008 12:08:42 +0200
Cc: austin-group-l@xxxxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=7fcDH4ZjKR6/9CLIMDKZY5Ulkp6cq2Rp/44NGEHqzZY=; b=kNT33JlEaGSkRVl3OfQf/0LreqthEvg1BPC6MmuQdVqS9zsxNi+3QzYgMj74vTxHNC uA4RS5tjgAt68PXAmjCm5JT+GS2oq0QGMJPAhv4S7P/DiGcbvkGhiqU+2yoJim2P6u2Z +UUP3WXLUTQsdWmsGN9eGvute7XnQDr5o8YSo=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=GuT1g4xkMlB6u3h2XlawHzCl42vaQqd5gKhzT7++ce4rZSfkAXRZwDpGM5Iqth3z+5 ap/yA6Ps/kqjbBpVCCfPEDndfogLc6oTkmQ0J8ONwt6V5k6Szjy0nGHGhbMTCskupWW+ l2+JyFqP+5J8qVrZtFPY8Rlgby+I62tVrf3YA=
References: <1217604384.26163.32.camel@xxxxxx> <200808011542.m71Fgc2p002689@xxxxxx> <20080801160715.GA14327@xxxxxx> <200808011654.m71GsV9i005409@xxxxxx> <20080801171355.GA15855@xxxxxx> <4896CDE1.9000609@xxxxxx> <20080804095510.45AE0154217@xxxxxx>
Roland McGrath wrote:
I think you are reading it wrong. In the scenario you described, your
previously-terminated child was not transformed into a zombie process.
Thanks Roland.  That makes sense.

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.
Yes.  Of course :-}.

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.
Again, that all makes sense.

Thanks,

Michael

<Prev in Thread] Current Thread [Next in Thread>