Bash, tar, and broken pipe

Chet Ramey chet at odin.INS.CWRU.Edu
Fri May 24 09:21:14 AEST 1991


In article <1147 at mwtech.UUCP> martin at 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 at po.CWRU.Edu
Case Western Reserve University	  NeXT Mail: chet at macbeth.INS.CWRU.Edu

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



More information about the Comp.unix.shell mailing list