[Top][All Lists]

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

Re: Pending signal in EXIT trap causes pattern matching to fail

From: Chet Ramey
Subject: Re: Pending signal in EXIT trap causes pattern matching to fail
Date: Wed, 12 Oct 2022 16:05:58 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.3.1

On 10/12/22 11:23 AM, Andreas Schwab wrote:
gmatch in lib/glob/sm_loop.c returns FNM_NOMATCH when a signal is
pending.  This can cause spurious pattern matching failures if a SIGPIPE
is received while executing the EXIT trap:

OK. An interrupt or a terminating signal, yes. Since gmatch and extmatch
can call each other recursively, this is a way to deal with the problem
described in


by letting higher layers handle it.

But that's not really the issue right here. The question is whether the
shell should process additional terminating signals while it's running the
exit trap from the terminating signal handler.

``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]