9 #include "ntp_syslog.h"
10 #include "ntp_stdlib.h"
16 #if defined(__STDC__) || defined(HAVE_STDARG_H)
23 #if defined(__STDC__) || defined(HAVE_STDARG_H)
26 void (*func) P((int));
32 vec.sa_handler = func;
33 sigemptyset(&vec.sa_mask);
36 vec.sa_flags = SA_RESTART;
46 struct sigaction ovec;
48 n = sigaction(sig, &vec, &ovec);
49 if (n == -1 && errno == EINTR) continue;
52 && ovec.sa_flags != SA_RESTART
55 msyslog(LOG_DEBUG, "signal_no_reset: signal %d had flags %x",
70 RETSIGTYPE (*func) (int)
76 bzero((char *) &sv, sizeof(sv));
78 n = sigvec(sig, &sv, (struct sigvec *)NULL);
90 RETSIGTYPE (*func) (int)
95 n = sigset(sig, func);
104 /* Beware! This implementation resets the signal to SIG_DFL */
108 RETSIGTYPE (*func) (int)
112 if (SIG_ERR == signal(sig, func)) {
115 n = signal(sig, func);