[Top][All Lists]

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

Re: [PATCH] Replacement for the sigs_to_ignore hack in timeout.c

From: Pádraig Brady
Subject: Re: [PATCH] Replacement for the sigs_to_ignore hack in timeout.c
Date: Fri, 10 Oct 2008 11:16:16 +0100
User-agent: Thunderbird (X11/20071008)

Giuseppe Scrivano wrote:
> Hi Pádraig,
> I think that the only problem can raise when the sent signal is received
> by the monitor process after the handler is reinstalled.  In that case
> the signal will be dispatched again to the process group.  This can
> repeat again and again until it is finally ignored by the monitor process.
> On http://www.opengroup.org/onlinepubs/009695399/functions/kill.html I
> can see in the "Rationale" section:
>  "There was initially strong sentiment to specify that, if pid
>   specifies that a signal be sent to the calling process and that
>   signal is not blocked, that signal would be delivered before kill()
>   returns. This would permit a process to call kill() and be guaranteed
>   that the call never return. ...... Such modifications have the effect
>   of satisfying the stronger requirement, at least when sigaction() is
>   used, but not necessarily when signal() is used."
> So I guess the case I described before shouldn't happen.

Well found! From there:

Implementors are encouraged to meet the stronger requirement
[to deliver signal to calling process before kill() returns] whenever possible

So it's probably fine, and seems so on Linux from my testing,
but I don't think we should change it as I can't see any advantage.
I'm worried about (older) platforms that don't implement this _recommendation_

What I will do is remove the FIXME comment and replace it with your comments.


reply via email to

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