bug-bash
[Top][All Lists]
Advanced

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

Re: SIGTERM ignored before exec race


From: Pádraig Brady
Subject: Re: SIGTERM ignored before exec race
Date: Mon, 25 Mar 2013 22:45:13 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 03/25/2013 02:55 PM, Chet Ramey wrote:
> On 3/25/13 10:34 AM, Pádraig Brady wrote:
> 
>> I've confirmed that bash 4.3 alpha doesn't have the issue.
>> Well I can't reproduce easily at least.
>> I didn't notice a NEWS item corresponding to it though.
> 
> It's not a new feature.  There are several items in CHANGES that refer to
> reworked signal handling.
> 
>> If I wanted to inspect this code change what would be the best approach?
> 
> Look for RESET_SIGTERM and CHECK_SIGTERM in the source code (jobs.c and
> execute_cmd.c, mostly) and trace the code back through quit.h to sig.c.

OK thanks for the pointer.
So the race is narrowed rather than closed?
As we have:

execute_disk_command()
{
  int pid = fork();
  if (pid == 0) /* child */
    {
       CHECK_SIGTERM; /* Honor received SIGTERM.  */
       do stuff;
       CHECK_SIGTERM; /* Honor received SIGTERM.  */
/* --->SIGTERM still ignored if received here?<--- */
       exec(...);
    }

thanks,
Pádraig.



reply via email to

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