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


Jeremie Koenig, le Wed 29 Jun 2011 18:30:16 +0200, a écrit :
> * hurd/hurdsig.c (check_pending_signals): Split into pending_signals,
> post_pending and post_all_pending_signals.
> (_hurd_internal_post_signal): Handle the distinction between poll
> requests and real signals there.

I believe it is correct.

There is just one change that would be worth mentioning in the changelog:

> -		      /* We "deliver" immediately pending blocked signals whose
> -			 action might be to ignore, so that if ignored they are
> -			 dropped right away.  */
> -		      || ss->actions[signo].sa_handler == SIG_IGN
> -		      || ss->actions[signo].sa_handler == SIG_DFL))

This is not done any more.  Actually I believe it is more correct. For
instance, I believe that the following

	signal(SIGINT, SIG_IGN);
	sighold(SIGINT);
	raise(SIGINT);
	signal(SIGINT, SIG_DFL);
	sigrelse(SIGINT);
	printf("foo\n");

is indeed supposed to terminate on sigrelse() (and it does on Linux),
and not ignore the signal just because the handler is currently SIGIGN.
It can indeed be useful to be able to block the signal while twiddling
with the signal handler.

Samuel


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