[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: sigaction module
From: |
Bruno Haible |
Subject: |
Re: RFC: sigaction module |
Date: |
Sun, 22 Jun 2008 21:36:54 +0200 |
User-agent: |
KMail/1.5.4 |
Eric Blake wrote:
> Your review hopefully made it even better.
Thanks for addressing all the issues. And thanks for noticing the
missing reloading of the handler in blocking_handler.
> OK, the version of the patch posted below should be safer in the presence of
> async signals (it will never be perfect, due to mingw's inherent data race
> caused by the temporary uninstallation of a handler, as well as its inability
> to atomically block signals).
Yes, I don't see workarounds for these two problems either,
An additional commit:
In lib/nanosleep.c there is no need to set up the newact variable in the
case when it is not used.
2008-06-22 Bruno Haible <address@hidden>
* lib/nanosleep.c (rpl_nanosleep): Setup newact only when it is needed.
*** lib/nanosleep.c.orig 2008-06-22 21:32:31.000000000 +0200
--- lib/nanosleep.c 2008-06-22 21:32:24.000000000 +0200
***************
*** 147,160 ****
/* set up sig handler */
if (! initialized)
{
! struct sigaction oldact, newact;
! newact.sa_handler = sighandler;
! sigemptyset (&newact.sa_mask);
! newact.sa_flags = 0;
sigaction (SIGCONT, NULL, &oldact);
if (get_handler (&oldact) != SIG_IGN)
! sigaction (SIGCONT, &newact, NULL);
initialized = true;
}
--- 147,164 ----
/* set up sig handler */
if (! initialized)
{
! struct sigaction oldact;
sigaction (SIGCONT, NULL, &oldact);
if (get_handler (&oldact) != SIG_IGN)
! {
! struct sigaction newact;
!
! newact.sa_handler = sighandler;
! sigemptyset (&newact.sa_mask);
! newact.sa_flags = 0;
! sigaction (SIGCONT, &newact, NULL);
! }
initialized = true;
}
- Re: sigaction, SA_SIGINFO, and SIG_IGN, (continued)
POSIX in docs [was: RFC: sigaction module], Eric Blake, 2008/06/17
Re: RFC: sigaction module, Eric Blake, 2008/06/20
Re: RFC: sigaction module,
Bruno Haible <=