diff options
Diffstat (limited to 'src/sig.c')
-rw-r--r-- | src/sig.c | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -18,7 +18,8 @@ void sig_alarmunblock() { sig_unblock(SIGALRM); } -void sig_alarmcatch(f) void (*f)(); + +void sig_alarmcatch(void (*f)(int)) { sig_catch(SIGALRM, f); } @@ -53,7 +54,7 @@ void sig_blocknone() sigprocmask(SIG_SETMASK, &ss, (sigset_t *)0); } -void sig_catch(int sig, void (*f)()) +void sig_catch(int sig, void (*f)(int)) { struct sigaction sa; sa.sa_handler = f; @@ -90,7 +91,8 @@ void sig_childunblock() { sig_unblock(SIGCHLD); } -void sig_childcatch(f) void (*f)(); + +void sig_childcatch(void (*f)(int)) { sig_catch(SIGCHLD, f); } @@ -111,7 +113,8 @@ void sig_hangupunblock() { sig_unblock(SIGHUP); } -void sig_hangupcatch(f) void (*f)(); + +void sig_hangupcatch(void (*f)(int)) { sig_catch(SIGHUP, f); } @@ -132,7 +135,8 @@ void sig_termunblock() { sig_unblock(SIGTERM); } -void sig_termcatch(f) void (*f)(); + +void sig_termcatch(f) void (*f)(int); { sig_catch(SIGTERM, f); } @@ -144,7 +148,7 @@ void sig_termdefault() int sig_term = SIGTERM; -void sig_bugcatch(void (*f)()) +void sig_bugcatch(void (*f)(int)) { sig_catch(SIGILL, f); sig_catch(SIGABRT, f); @@ -159,7 +163,7 @@ void sig_bugcatch(void (*f)()) #endif } -void (*sig_defaulthandler)() = SIG_DFL; +void (*sig_defaulthandler)(int) = SIG_DFL; void sig_miscignore() { @@ -176,6 +180,6 @@ void sig_miscignore() #endif } -void (*sig_ignorehandler)() = SIG_IGN; +void (*sig_ignorehandler)(int) = SIG_IGN; int sig_cont = SIGCONT; |