Date: Tue, 9 Jul 1996 15:14:19 -0500 (CDT) From: Alex Nash <alex@fa.tdktca.com> To: Brandon Gillespie <brandon@tombstone.sunrem.com> Cc: freebsd-hackers@freebsd.org Subject: Re: handling SIGCHLD with multiple children Message-ID: <Pine.BSF.3.91.960709151339.13009E-100000@fa.tdktca.com> In-Reply-To: <Pine.BSF.3.91.960709122409.4725A-100000@tombstone.sunrem.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 9 Jul 1996, Brandon Gillespie wrote: > Is there _ANY_ way of finding what child sent a SIGCHLD signal to the > parent process? I have a situation where a parent may have multiple > children processing different tasks, and the parent is waiting for one > child to complete a specific task, which it cares about, but it does not > care about the other children. Because of this in most instances when > SIGCHLD is received it simply resets it and continues working, except for > now I need to handle things differently when a specific child sends > SIGCHLD. Is there any ANY way to figure out where it came from? > > Thanks.. > > -Brandon > See the man page for wait3: RETURN VALUES If wait() returns due to a stopped or terminated child process, the pro- cess ID of the child is returned to the calling process. Otherwise, a value of -1 is returned and errno is set to indicate the error. Alex
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.960709151339.13009E-100000>