Tsignal_handler handler;
};
-#ifdef HAVE_SIGACTION_SIGINFO_SIGNALS
-void
+Tsignal_handler_result
signal_forwarder (int signo, siginfo_t *siginfo, void *ptr)
-#else
-REGSIGTYPE
-signal_forwarder (int signo)
-#endif
{
pthread_t self;
if (old->signo == signo)
{
trace ("signal_forwarder: running handler\n");
-#ifdef HAVE_SIGACTION_SIGINFO_SIGNALS
(old->handler)(signo, siginfo, ptr);
-#else
- (old->handler)(signo);
-#endif
return;
}
scan = scan->next;
err = sigaction (signo, 0, (&act));
if (err != 0)
complain ("init_signal_forwarder: sigaction access failed\n");
-#ifdef HAVE_SIGACTION_SIGINFO_SIGNALS
handler = act.sa_sigaction;
-#else
- handler = act.sa_handler;
-#endif
if ((handler == ((Tsignal_handler) SIG_DFL))
|| (handler == (Tsignal_handler) SIG_IGN))
return;
-#ifdef HAVE_SIGACTION_SIGINFO_SIGNALS
act.sa_sigaction = &signal_forwarder;
-#else
- act.sa_handler = &signal_forwarder;
-#endif
err = sigaction (signo, &act, 0);
if (err != 0)