summaryrefslogtreecommitdiff
path: root/src/sig.c
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-09 16:05:46 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-09 16:05:46 +0200
commit08ce54211ce4b8d6092321ca1b28773a680ddc45 (patch)
tree9cf7eb2702a408743d59e207e24f8fb1e5ada31d /src/sig.c
parent795ffc5e62e8ba383575dbcd9943a580d4bd3358 (diff)
Added missing function prototype signatures.
Corrected socket_broadcast name to socket_broadcast4 in socket_if.h. Added const to fmt_str.
Diffstat (limited to 'src/sig.c')
-rw-r--r--src/sig.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/sig.c b/src/sig.c
index bf8510e..4c88143 100644
--- a/src/sig.c
+++ b/src/sig.c
@@ -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;