bug-bash
[Top][All Lists]
Advanced

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

Re: EXIT trap definition order


From: Chet Ramey
Subject: Re: EXIT trap definition order
Date: Mon, 20 Mar 2023 10:57:00 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

On 3/17/23 1:28 PM, Grisha Levit wrote:
It seems that if a trap handler for a terminating signal resends its
own signal (after resetting the signal disposition), any configured
EXIT trap will be executed (as I think is expected), but only if an
EXIT trap had already been set prior to the the first instance of a
trap having been set for the terminating signal in question.

If the shell is handling a terminating signal and receives another instance
of that signal while doing so, it takes that as an indication to exit
immediately.

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




reply via email to

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