[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SIGINT kills interactive shell from dot script

From: Martijn Dekker
Subject: Re: SIGINT kills interactive shell from dot script
Date: Sun, 6 Nov 2016 12:01:10 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

Op 06-11-16 om 09:08 schreef Martijn Dekker:
> An interactive bash is killed by SIGINT after a command to unset any
> trap for SIGINT.

...if executed in a dot script, that is (in case that wasn't clear from
the subject line and the code examples).

Another datapoint: the same phenomenon occurs if the SIGINT trap is
unset from within the trap itself.

$ trap 'echo "unignoring SIGINT"; trap - INT; kill -s INT "$$"' INT
$ kill -s INT "$$"
unignoring SIGINT
(interactive shell exits. Expected behaviour: return to command prompt
with exit status 130)


- M.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]