[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] What is the effect of `kill -s INT -$$` within the INT t
Re: [Help-bash] What is the effect of `kill -s INT -$$` within the INT trap of the same script?
Fri, 21 Dec 2018 11:28:31 -0500
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.3.3
On 12/17/18 3:18 PM, Peng Yu wrote:
> I am not sure if I understand the following behavior correctly. If I
> call `kill -s INT -$$` within the INT trap, why the INT trap is only
> called one?
Bash tries to prevent recursive trap handler invocations. ksh93 and dash,
for instance, are happy to run the trap handler until the process runs out
of stack space and the kernel kills it.
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU address@hidden http://tiswww.cwru.edu/~chet/