This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 04/15] Hurd signals: refactor check_pending_signals


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]