On 11/6/16 4:08 AM, Martijn Dekker wrote:
> An interactive bash is killed by SIGINT after a command to unset any
> trap for SIGINT.
> 
> $ cat >/tmp/dotscript <<EOF
> trap
> trap - INT
> kill -s INT "$$"
> EOF
> $ . /tmp/dotscript
> (no output of 'trap')
> (interactive shell exits)

You're on a roll finding long-lived bugs this week.  This behavior has
been there for at least 20 years (I stopped looking when I got to 1995).
It should be an easy thing to change.

> Interestingly, the shell does not exit without the "trap - INT",
> although no trap was set for INT to begin with (as shown by the empty
> output of "trap").

It looks like the shell interpreted "reset to the default value" a little
too literally in this particular case.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to