bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Samuel Thibault
Subject: Re: [PATCH 04/15] Hurd signals: refactor check_pending_signals
Date: Sun, 3 Jul 2011 00:34:22 +0200
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]