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: Roman Rakus
Subject: Re: bash trap ignore signal - race condition
Date: Thu, 14 Apr 2011 03:07:21 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9

On 04/13/2011 03:45 PM, Chet Ramey wrote:
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
I just want some way to not ignore the signal. For example handle the signal after initialization of trap even if the signal is delivered during this initialization.
Or document current behavior.

RR



reply via email to

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