diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-10-31 20:17:59 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-10-31 20:17:59 +0000 |
commit | 1eaf7ae9d7ff2adf3249176c155ae66dea08ecc3 (patch) | |
tree | d020778c6956a535dd35a4626b7857b36b775c20 /app/xsm/signals.c | |
parent | 0aea447cde00cd16718571f752213425ba2b2d23 (diff) |
Update to xsm 1.0.2
Diffstat (limited to 'app/xsm/signals.c')
-rw-r--r-- | app/xsm/signals.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/app/xsm/signals.c b/app/xsm/signals.c index 9be9babb1..5757e0ccc 100644 --- a/app/xsm/signals.c +++ b/app/xsm/signals.c @@ -98,15 +98,13 @@ in this Software without prior written authorization from The Open Group. #include <stddef.h> -int checkpoint_from_signal = 0; +#include "xsm.h" -extern XtSignalId sig_term_id, sig_usr1_id; -extern Bool wantShutdown; +int checkpoint_from_signal = 0; -SIGVAL (*Signal (sig, handler))() - int sig; - SIGVAL (*handler)(); +static SIGVAL +Signal(int sig, SIGVAL (*handler)(int)) { #ifndef X_NOT_POSIX struct sigaction sigact, osigact; @@ -114,15 +112,20 @@ SIGVAL (*Signal (sig, handler))() sigemptyset(&sigact.sa_mask); sigact.sa_flags = 0; sigaction(sig, &sigact, &osigact); +# if defined(SIGNALRETURNSINT) return osigact.sa_handler; +# endif #else - return signal(sig, handler); +# if defined(SIGNALRETURNSINT) + return +# endif + signal(sig, handler); #endif } void -sig_child_handler (XtPointer closure, XtSignalId id) +sig_child_handler (int sig) { int pid, olderrno = errno; @@ -231,10 +234,7 @@ register_signals (XtAppContext appContext) int -execute_system_command (s) - -char *s; - +execute_system_command (char *s) { int stat; |