From owner-freebsd-hackers@FreeBSD.ORG Sat May 31 00:52:14 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E0AB937B404 for ; Sat, 31 May 2003 00:52:14 -0700 (PDT) Received: from segfault.kiev.ua (segfault.kiev.ua [193.193.193.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id BAE4843F3F for ; Sat, 31 May 2003 00:52:12 -0700 (PDT) (envelope-from netch@iv.nn.kiev.ua) Received: (from uucp@localhost) by segfault.kiev.ua (8) with UUCP id h5V7qB6c071576; Sat, 31 May 2003 10:52:11 +0300 (EEST) (envelope-from netch@iv.nn.kiev.ua) Received: (from netch@localhost) by iv.nn.kiev.ua (8.12.8p1/8.12.8) id h4V7hnbD005544; Sat, 31 May 2003 10:43:49 +0300 (EEST) (envelope-from netch) Date: Sat, 31 May 2003 10:43:49 +0300 From: Valentin Nechayev To: Paul Herman Message-ID: <20030531074349.GC5288@iv.nn.kiev.ua> References: <20030530213533.E229-100000@mammoth.eat.frenchfries.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030530213533.E229-100000@mammoth.eat.frenchfries.net> X-42: On Organization: Dark side of coredump cc: hackers@freebsd.org Subject: Re: Proper behaviour for wait()? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 May 2003 07:52:15 -0000 Fri, May 30, 2003 at 22:00:18, pherman (Paul Herman) wrote about "Proper behaviour for wait()?": PH> anyone know what the "proper" behavior for wait() is when SIGCHLD PH> is ignored? Is it simply undefined? Don't see anything mentioned PH> in the wait(2) manpage one way or tother, and other OSes don't seem PH> to agree much. Citing SUSv2: SA_NOCLDWAIT If set, and sig equals SIGCHLD, child processes of the calling processes will not be transformed into zombie processes when they terminate. If the calling process subsequently waits for its children, and the process has no unwaited for children that were transformed into zombie processes, it will block until all of its children terminate, and wait(), wait3(), waitid() and waitpid() will fail and set errno to [ECHILD]. Otherwise, terminating child processes will be transformed into zombie processes, unless SIGCHLD is set to SIG_IGN. The same for SUSv3. -netch-