bug-bash
[Top][All Lists]
Advanced

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

Re: signals ignored in a subshell


From: Chet Ramey
Subject: Re: signals ignored in a subshell
Date: Sun, 5 Apr 2020 16:00:21 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

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



reply via email to

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