Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!indri!unmvax!ncar!boulder!stan!dce From: dce@Solbourne.COM (David Elliott) Newsgroups: comp.unix.wizards Subject: Re: Shell scripts - getting parent status in read Message-ID: <866@marvin.Solbourne.COM> Date: 24 Apr 89 16:16:33 GMT References: <861@marvin.Solbourne.COM> <849@twwells.uucp> Reply-To: dce@Solbourne.com (David Elliott) Organization: Solbourne Computer Inc., Longmont, Colorado Lines: 23 In article <849@twwells.uucp> bill@twwells.UUCP (T. William Wells) writes: >Try enabling SIGPIPE in your parent before calling the shell script. >When the parent dies, the children trying to read from pipes set up >by the parent should then get a signal. You might have to use a trap >command in the shells, though. Are you sure about this? SIGPIPE *is* "enabled" in the parent (I just checked). Generally, when you execute a program interactively, all signals are set to SIG_DFL. Also, SIGPIPE is not a special case, so the default for it is to cause the program to terminate. In any case, SIGPIPE means that an attempt was made to write on a pipe with noone to read it, and that's not what is happening here (I did say that in the original note, I think). This is a situation where a read is being attempted on a pipe with noone on the other side. I would think this would cause an EOF, and there was some discussion on this recently, but it doesn't. -- David Elliott dce@Solbourne.COM ...!{boulder,nbires,sun}!stan!dce