Newsgroups: comp.unix.shell
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!wuarchive!ukma!usenet.ins.cwru.edu!odin!chet
From: chet@odin.INS.CWRU.Edu (Chet Ramey)
Subject: Re: Bash, tar, and broken pipe
Message-ID: <1991May23.232114.28558@usenet.ins.cwru.edu>
Sender: news@usenet.ins.cwru.edu
Nntp-Posting-Host: odin.ins.cwru.edu
Reply-To: chet@po.CWRU.Edu
Organization: Yoyodyne Propulsion Systems, Inc.
References: <heinz.674916703@cc.univie.ac.at> <1991May22.192914.22142@usenet.ins.cwru.edu> <1147@mwtech.UUCP>
Date: Thu, 23 May 91 23:21:14 GMT
Lines:       22

In article <1147@mwtech.UUCP> martin@mwtech.UUCP (Martin Weitzel) writes:

>>	_exit(128+sig);
>	^^^^^^^^^^^^^^  rather: kill(getpid(), sig); ????

You're right, but you have to deal with all the differences between the
BSD/Posix signals and the Sys V signals.  Simply replacing the call to exit
with the kill signal will cause an infinite loop.

>Hmm, I know that the shell encodes the information that some program
>was terminated by a signal this way in $? - but the other way round
>should also be true? On which system and for which shell?

No system, and for no shell.  I made a mistake.

Chet
-- 
Chet Ramey			  Internet: chet@po.CWRU.Edu
Case Western Reserve University	  NeXT Mail: chet@macbeth.INS.CWRU.Edu

``Now,  somehow we've brought our sins back physically -- and they're pissed.''
