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
