[PATCH 04/15] Hurd signals: refactor check_pending_signals
Jeremie Koenig
jk@jk.fr.eu.org
Mon Jul 4 01:40:00 GMT 2011
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
More information about the Libc-alpha
mailing list