[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: Thu, 8 Dec 2022 10:44:50 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.1

On 12/7/22 11:24 AM, Andreas Schwab wrote:
On Okt 12 2022, Chet Ramey wrote:

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 problem is that the shell becomes uninterruptable while running the
exit trap.

I'm not sure why you're jumping back into this one after two months, but
this is why there's this code in sig.c in the devel branch:

  /* If we are currently handling a terminating signal, we have a couple of
     choices here. We can ignore this second terminating signal and let the
     shell exit from the first one, or we can exit immediately by killing
     the shell with this signal. This code implements the latter; to implement
     the former, replace the kill_shell(sig) with return. */
  if (handling_termsig)
    kill_shell (sig);           /* just short-circuit now */

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