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: Samuel Thibault <samuel dot thibault at gnu dot org>
- To: Jeremie Koenig <jk at jk dot fr dot eu dot org>
- Cc: 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 00:34:22 +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>
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