Re: waitpid() does not wait for process exit
Re: waitpid() does not wait for process exit
- Subject: Re: waitpid() does not wait for process exit
- From: Bayard Bell <email@hidden>
- Date: Wed, 04 May 2011 17:26:07 +0100
It may not be as explicit as you'd like in referencing SIGCHLD, but it does, via the last paragraph below:
NOTES
See sigaction(2) for a list of termination signals. A status of 0 indicates normal termination.
If a parent process terminates without waiting for all of its child processes to terminate, the remain-
ing child processes are assigned the parent process 1 ID (the init process ID).
If a signal is caught while any of the wait() calls is pending, the call may be interrupted or
restarted when the signal-catching routine returns, depending on the options in effect for the signal;
see intro(2), System call restart.
On 4 May 2011, at 16:33, Anatol Pomozov wrote:
> Hi
>
> On Tue, May 3, 2011 at 9:49 PM, Dave Keck <email@hidden> wrote:
>> A quick guess: perhaps your parent process has elected for the kernel
>> to automatically reap child processes, via a call similar to:
>>
>> signal(SIGCHLD, SIG_IGN);
>>
>> I would expect the behavior you describe from waitpid() if the above
>> functionality is enabled.
>>
>> See http://en.wikipedia.org/wiki/SIGCHLD.
>
> Aha, Thanks.
>
> Although tup does not use SIGCHLD, the macfuse library does. In the
> function fuse_mount_core() from
> http://macfuse.googlecode.com/svn/trunk/core/10.5/libfuse/fuse-2.7.3-macosx.patch
>
> it has
> signal(SIGCHLD, SIG_DFL);
> and later
> signal(SIGCHLD, SIG_IGN);
>
> Now I am trying to understand why macfuse does it.
>
> PS "man waitpid" on my macosx does not mention SIGCHLD
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Darwin-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden