Date: Fri, 1 Dec 1995 04:10:12 -0500 From: john hood <cgull@smoke.marlboro.vt.us> To: FreeBSD-gnats-submit@freebsd.org Cc: netbsd-bugs@netbsd.org, flla@stud.uni-sb.de Subject: bin/859: longstanding ash -c bug [FreeBSD report] Message-ID: <199512010910.EAA04330@smoke.marlboro.vt.us> Resent-Message-ID: <199512010920.BAA25019@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 859 >Category: bin >Synopsis: /bin/sh -c does not ignore SIGINT >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 1 01:20:03 PST 1995 >Last-Modified: >Originator: john hood >Organization: none >Release: FreeBSD 2.0-BUILT-19950603 i386 >Environment: any variant of the Almquist shell I've ever tested, including netbsd 0.9, netbsd 1.0-current-sparc of about six months ago, freebsd 1.1.5.1, freebsd 2.1.5, the antique Linux port of the Almquist shell, and the way ancient comp.sources.unix distribution by Almquist himself (yes, i've been extremely lame about this bug) >Description: 'sh -c command' does not ignore/handle SIGINT while waiting for command to complete. >How-To-Repeat: keyboard SIGINT in emacs or vi while posting in trn, or try this interactive ditty and see if the subshell keeps on running: ------------------------------8<------------------------------ #!/bin/sh # # test sig handling in sh -c # # create second script TF=/tmp/test.$$ cat > $TF <<\/EOF #!/bin/sh echo -e "shell c flags: $-" trap trap : 2 3 echo "Type ^C and ^\\" for i in a b c d e do sleep 1 echo shell c: $i done /EOF chmod a+x $TF if [ $# != 1 ] then echo "$0 shell-to-test" exit 1 fi SHELL=$1 echo -e "shell a flags: $-" trap trap : 2 3 $SHELL -c "echo shell b flags: $-; trap; $TF" echo 'shell a exit: ' $? rm $TF ------------------------------8<------------------------------ >Fix: none >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512010910.EAA04330>