Re: waitpid() does not wait for process exit
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to :content-transfer-encoding:x-pgp-agent:x-mailer; bh=GqKooD2Xx7B/DQ9siNJzoZ+pMfNTTk0Vc08AN2MtIZY=; b=GcYwSG/rWjR9qgkCU/e0icuBhOHmzCrWGsdp3KZWyenfLNv9zR1+DYl9P/QqPyJnzY Po6Zc+UWRrwW8zPGpdGNU3lal4hLBpY1b2ZytYcd8KSfCkDyu2ao/1FMslJqIJeMIR0u lgly/5OOn1dlaQ4HobJZgwGC5NJtLmttTYfmw= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to:content-transfer-encoding:x-pgp-agent :x-mailer; b=Mho9JfDO+5V6+3qAH4gbWtDDdpVTCWUnYZZKd/cgeaVTX4FPALicQe3X5BM+SyyyxG 5G3rq3myyJuOu6bXZYKSo18nZN2oX5L6bRpVCh92TIkP5LetyOEXsGM+wglkIUilRfWZ 22trJEVXGPI3Vw9infwld608nLkNpjJP7A9Uo= 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 <davekeck@gmail.com> 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.
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....
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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/buffer.g.overflow%40gmail....
This email sent to buffer.g.overflow@gmail.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com smime.p7s PGP.sig
participants (1)
-
Bayard Bell