[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 04/15] Hurd signals: refactor check_pending_signals
From: |
Jeremie Koenig |
Subject: |
Re: [PATCH 04/15] Hurd signals: refactor check_pending_signals |
Date: |
Sun, 3 Jul 2011 21:40:32 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sun, Jul 03, 2011 at 09:30:01PM +0200, Jeremie Koenig wrote:
> | if (act != ignore && /* Signals ignored now are forgotten now.
> */
> | __sigismember (&ss->blocked, signo) ||
> | (signo != SIGKILL && _hurd_stopped))
> | {
> | mark_pending ();
> | act = ignore;
> | }
> (...)
>
> So the patch probably changes behaviour only in corner cases, if at all.
Hmm, actually the following modified example does terminate:
signal(SIGINT, SIG_IGN);
sighold(SIGINT);
raise(SIGSTOP);
$ kill -INT %1
$ fg
signal(SIGINT, SIG_DFL);
sigrelse(SIGINT);
/* interruped here */
printf("foo\n");
In my interpretation this behaviour is still compiliant, but maybe I
should reintroduce the check to make it more consistent, or shuffle the
parenthesis in the code snippet above:
| if (act != ignore && /* Signals ignored now are forgotten now. */
| (__sigismember (&ss->blocked, signo) ||
| signo != SIGKILL && _hurd_stopped))
--
Jeremie Koenig <jk@jk.fr.eu.org>
http://jk.fr.eu.org