bug-bash
[Top][All Lists]
Advanced

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

Re: bash trap ignore signal - race condition


From: Chet Ramey
Subject: Re: bash trap ignore signal - race condition
Date: Wed, 13 Apr 2011 09:45:15 -0400
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9

On 4/12/11 11:04 PM, Roman Rakus wrote:
> On 04/12/2011 03:30 PM, Chet Ramey wrote:
>> Probably because it's very old code.  That has been there essentially
>> unchanged since at least bash-1.12 -- almost twenty years ago.  It would
>> be better to block the signal while the trap string and handler are
>> being modified.
>>
>> Chet
> Thanks for the answer. And what about to not ignore the signal, but use
> some help handler, which will store the information that the signal is
> caught and then after the trap handler is initialized check that
> information? Or some documentation note about this?

I'm not sure I understand this.  Why is using a temporary handler better
than blocking the signal until the trap handler is in place, then
unblocking it and allowing any pending signal to be delivered?

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



reply via email to

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