[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sigaction, SA_SIGINFO, and SIG_IGN
From: |
Bruno Haible |
Subject: |
Re: sigaction, SA_SIGINFO, and SIG_IGN |
Date: |
Fri, 20 Jun 2008 01:43:40 +0200 |
User-agent: |
KMail/1.5.4 |
Paul Eggert wrote:
> I'd feel a bit safer if we wrote the code to conform to POSIX rather
> than assume the typical implementation where sa_handler and
> sa_sigaction overlap.
Sorry, I can't follow the argumentation. The set of systems where
sa_handler and sa_sigaction are disjoint is empty, and you make assumptions
how these systems will likely behave. Since such systems don't exist, it
is speculation. You base your speculation on POSIX, but the case we are
discussing is when the application does not obey POSIX and the system does
not detect it. How do you want to use POSIX as an argument here?
> How about something like this instead?
>
> if (sigaction (fatal_signals[i], NULL, &action) == 0
> && ((action.sa_flags & SA_SIGINFO
> ? (void (*) (int)) action.sa_sigaction
> : action.sa_handler)
> == SIG_IGN))
> fatal_signals[i] = -1;
This will not compile on Interix 3.5, whereas the current code does.
And while Interix is not POSIX conformant, it is an existing system.
Bruno
- Re: RFC: sigaction module, (continued)
- Re: RFC: sigaction module, Bruno Haible, 2008/06/17
- Re: RFC: sigaction module, Eric Blake, 2008/06/17
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Bruno Haible, 2008/06/17
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Eric Blake, 2008/06/17
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Bruno Haible, 2008/06/18
- RE: sigaction, SA_SIGINFO, and SIG_IGN, Jason Zions, 2008/06/18
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Bruno Haible, 2008/06/19
- Re: Interix, Bruno Haible, 2008/06/19
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Paul Eggert, 2008/06/19
- Re: sigaction, SA_SIGINFO, and SIG_IGN,
Bruno Haible <=
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Paul Eggert, 2008/06/20
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Eric Blake, 2008/06/20
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Bruno Haible, 2008/06/20
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Eric Blake, 2008/06/21
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Bruno Haible, 2008/06/22
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Bruno Haible, 2008/06/22
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Bruno Haible, 2008/06/22
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Bruno Haible, 2008/06/22
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Eric Blake, 2008/06/23
- Re: sigaction, SA_SIGINFO, and SIG_IGN, Bruno Haible, 2008/06/22