Date: Thu, 20 Jan 2000 08:45:16 +1000 (EST) From: Colin Campbell <sgcccdc@citec.qld.gov.au> To: freebsd-questions@FreeBSD.ORG Subject: Re: Detecting when your parent process dies. Message-ID: <Pine.LNX.4.10.10001200844140.18152-100000@guru.citec.qld.gov.au> In-Reply-To: <200001191814.TAA22396@dorifer.heim3.tu-clausthal.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, On Wed, 19 Jan 2000, Oliver Fromme wrote: > Scott Hess <scott@avantgo.com> wrote in list.freebsd-questions: > > I may not have been complete enough in my description. I'm using rfork() > > _without_ RFFDG or RFCFDG. This means that the parent and child share file > > descriptor tables. That means that the above fix won't work, because even > > if the parent process exits, the pipe will still be open on both ends (as > > long as one or more children live), so you'll never detect EOF. > > > > I suspect that this also means that most file descriptor based tricks won't > > work, because of the shared file descriptor table. > > In that case, there is no other way except polling the PID > (which is not only inefficient, but also not reliable). > kWhat about "polling" using getppid(). If the parent dies, the PPID will change (to 1?), will it not? Colin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.10.10001200844140.18152-100000>