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: Chet Ramey
Subject: Re: SIGTERM ignored before exec race
Date: Thu, 14 Feb 2013 11:42:08 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

On 2/9/13 12:02 AM, Pádraig Brady wrote:
> $ rpm -q kernel glibc bash
> kernel-2.6.40.4-5.fc15.x86_64
> glibc-2.14.1-6.x86_64
> bash-4.2.10-4.fc15.x86_64
> 
> I notice the following will wait for 5 seconds for
> the timeout process to end with SIGALRM, rather than
> immediately due to kill sending the SIGTERM.

This race condition is more apparent on systems where the scheduler gives
priority to interactive processes (like Mac OS X).  dash and mksh behave
the same as bash on my Mac OS X boxes.  ksh93 does not, but it appears to
do something with SIGTERM internally rather than setting the handler to
SIG_IGN.

That may be the way to go with this.  I'll have to look at it some more.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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