Subject: Re: bin/6213: /bin/sh mishandles trapped signals during "read"
To: Christoph Badura <bad@ora.de>
From: Markus Tacke <tacke@uni-mainz.de>
List: netbsd-bugs
Date: 09/30/1998 18:23:15
Christoph Badura <bad@ora.de> writes:
 
>boquist@cs.chalmers.se (Urban Boquist) writes:

>>If you "trap" SIGTERM and then execute the sh builtin "read", the shell will
>>not react to SIGTERM until the "read" is done (you have to press RETURN).
>
>And what makes you think this is a bug?  I mean, a real Bourne shell behaves
>the same with you example.

Which 'real' bourne shell do you mean? I tried:
 
DEC OSF1 3.2, Digital Unix 4
Solaris 2.5.1
AIX 3.2.5, 4.1.5, 4.2
IRIX 6.2
HP-UX 10.20

and even bash (on all systems including 1.3.2) 
do it right, they differ only in the wether there is a newline
between 'waiting' and 'foo' or not.

The only one I found which does it like sh on NetBSD (1.3.2) is sh on
SUNOS 4.1 on my old SUN 3. so what ist the real sh??
I personally regard it as a Bug.

Markus 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Markus Tacke, ZDV, Johannes Gutenberg Universitaet Mainz, ZDV, D-55099 Mainz   
email:             markus.tacke@uni-mainz.de                  The turtle moves!
Tel: +49 6131 39-6327 Fax: -6407 ZDVorg: -6300  (Terry Pratchett -- SMALL GODS)