On 4/4/20 1:32 AM, Oğuz wrote:
> While waiting for read builtin to complete, bash executes signal handlers
> in a subshell where signals are ignored.

It doesn't, though. What bash-5.0 does is to effectively block SIGINT
while executing a trap handler for SIGINT, since it doesn't let you run
SIGINT trap handlers recursively. It's done that for at least 25 years,
since I quit looking back when I got to bash-2.0.

The devel branch version allows you to recursively execute a trap handler
as many times as you like, or until you exceed your stack limit or hit
the EVALNEST limit. I changed this in January, 2020. The devel versions
will issue a warning.

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://tiswww.cwru.edu/~chet/

Reply via email to