From owner-freebsd-bugs Fri Dec 1 01:20:09 1995 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id BAA25070 for bugs-outgoing; Fri, 1 Dec 1995 01:20:09 -0800 Received: (from gnats@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id BAA25019 ; Fri, 1 Dec 1995 01:20:04 -0800 Resent-Date: Fri, 1 Dec 1995 01:20:04 -0800 Resent-Message-Id: <199512010920.BAA25019@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, cgull@smoke.marlboro.vt.us Received: from smoke.marlboro.vt.us (smoke.marlboro.vt.us [198.206.215.91]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id BAA22949 for ; Fri, 1 Dec 1995 01:11:22 -0800 Received: (from cgull@localhost) by smoke.marlboro.vt.us (8.6.*cough-wheeze*/8.6.9) id EAA04330; Fri, 1 Dec 1995 04:10:12 -0500 Message-Id: <199512010910.EAA04330@smoke.marlboro.vt.us> Date: Fri, 1 Dec 1995 04:10:12 -0500 From: john hood Reply-To: cgull@smoke.marlboro.vt.us To: FreeBSD-gnats-submit@freebsd.org Cc: netbsd-bugs@netbsd.org, flla@stud.uni-sb.de X-Send-Pr-Version: 3.2 Subject: bin/859: longstanding ash -c bug [FreeBSD report] Sender: owner-bugs@freebsd.org Precedence: bulk >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: