From owner-freebsd-questions Sat Jan 22 6:47:13 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 19C5E14CAE for ; Sat, 22 Jan 2000 06:47:01 -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 PAA13630; Sat, 22 Jan 2000 15:46:41 +0100 (CET) (envelope-from olli) Date: Sat, 22 Jan 2000 15:46:41 +0100 (CET) Message-Id: <200001221446.PAA13630@dorifer.heim3.tu-clausthal.de> From: Oliver Fromme To: freebsd-questions@FreeBSD.ORG, keramida@ceid.upatras.gr Reply-To: freebsd-questions@FreeBSD.ORG Subject: Re: Detecting when your parent process dies. X-Newsgroups: list.freebsd-questions In-Reply-To: <868478$21of$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 Giorgos Keramidas wrote in list.freebsd-questions: > On Thu, Jan 20, 2000 at 08:45:16AM +1000, Colin Campbell wrote: >> >> What about "polling" using getppid(). If the parent dies, the PPID >> will change (to 1?), will it not? > > Yes, if the parent catches SIGCHLD, I think that this is the rule. But > it's still polling... It doesn't matter if the parent catches SIGCHLD. When it dies, the orphaned process is picked up by init (PID 1), no matter what. But you're right: it's still polling... 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