From owner-freebsd-questions Wed Jan 19 10:14:28 2000 Delivered-To: freebsd-questions@freebsd.org Received: from dorifer.heim3.tu-clausthal.de (dorifer.heim3.tu-clausthal.de [139.174.243.252]) by hub.freebsd.org (Postfix) with ESMTP id 427DE15318 for ; Wed, 19 Jan 2000 10:14:25 -0800 (PST) (envelope-from olli@dorifer.heim3.tu-clausthal.de) Received: (from olli@localhost) by dorifer.heim3.tu-clausthal.de (8.9.3/8.9.3) id TAA22396; Wed, 19 Jan 2000 19:14:23 +0100 (CET) (envelope-from olli) Date: Wed, 19 Jan 2000 19:14:23 +0100 (CET) Message-Id: <200001191814.TAA22396@dorifer.heim3.tu-clausthal.de> From: Oliver Fromme To: freebsd-questions@FreeBSD.ORG Reply-To: freebsd-questions@FreeBSD.ORG Subject: Re: Detecting when your parent process dies. X-Newsgroups: list.freebsd-questions In-Reply-To: <864juk$2uk0$1@atlantis.rz.tu-clausthal.de> User-Agent: tin/1.4.1-19991201 ("Polish") (UNIX) (FreeBSD/3.4-19991219-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Scott Hess 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). Regards Oliver -- Oliver Fromme, Leibnizstr. 18/61, 38678 Clausthal, Germany (Info: finger userinfo:olli@dorifer.heim3.tu-clausthal.de) "In jedem Stück Kohle wartet ein Diamant auf seine Geburt" (Terry Pratchett) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message