Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site rlgvax.UUCP
Path: utzoo!watmath!clyde!cbosgd!ihnp4!mhuxn!mhuxj!mhuxr!ulysses!allegra!mit-eddie!godot!harvard!seismo!rlgvax!guy
From: guy@rlgvax.UUCP (Guy Harris)
Newsgroups: net.unix-wizards,net.bugs.usg
Subject: Re: Shell out bug in pg (but a more general problem)
Message-ID: <562@rlgvax.UUCP>
Date: Thu, 7-Mar-85 18:47:05 EST
Article-I.D.: rlgvax.562
Posted: Thu Mar  7 18:47:05 1985
Date-Received: Sat, 9-Mar-85 08:41:16 EST
References: <12@istbt.UUCP>
Organization: CCI Office Systems Group, Reston, VA
Lines: 17
Xref: watmath net.unix-wizards:12340 net.bugs.usg:190

Code which starts up a child process and does a general "wait" for any
children without checking that the child they're interested in is what
exited is broken, due, as you mentioned, to the fact that the shell's
way of setting up pipelines creates unexpected edges in the family
tree of processes.  This was discovered in the 4.2BSD "crypt" a while
ago, so such broken code is not restricted to System V.

Any such code out there should be redone, and all future code which
waits for children *must* check that the process which exited is the
process that was being waited for.

I don't know how seriously to take the comment about SIGCLD and SIGPWR,
considering 1) the System III manual said they'd go away, and they're still
here and 2) System V's "init" uses both of those signals.
-- 
	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy