'sh -c command' does not ignore/handle SIGINT while waiting for command to complete. Fix: none 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<------------------------------
Responsible Changed From-To: freebsd-bugs->joerg I'm goinmg to deal with sh(1) bugs some day.
State Changed From-To: open->closed Fixed with the recent integration of Lite2 fixes. Thanks to Steve Price <sprice@hiwaay.net> for pointing this out.