This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 04/15] Hurd signals: refactor check_pending_signals
- From: Jeremie Koenig <jk at jk dot fr dot eu dot org>
- To: libc-alpha at sourceware dot org, bug-hurd at gnu dot org,Roland McGrath <roland at hack dot frob dot com>
- Date: Sun, 3 Jul 2011 21:40:32 +0200
- Subject: Re: [PATCH 04/15] Hurd signals: refactor check_pending_signals
- References: <1309365027-4774-1-git-send-email-jk@jk.fr.eu.org><1309365027-4774-5-git-send-email-jk@jk.fr.eu.org><20110702223421.GG11935@const.famille.thibault.fr><20110703193001.GA16517@jk.fr.eu.org>
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