summaryrefslogtreecommitdiff
path: root/src/sig.c
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-09 15:50:21 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-09 15:50:21 +0200
commit795ffc5e62e8ba383575dbcd9943a580d4bd3358 (patch)
treec128889056202b255e2f22afeb7717894d350862 /src/sig.c
parent5fadc0cbb8577c61d66bd6f19ceaf0507c11e23b (diff)
formatting changes
Manual format adjustments. Comment adjustments. Remove usage of the register keyword.
Diffstat (limited to 'src/sig.c')
-rw-r--r--src/sig.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/sig.c b/src/sig.c
index 1ea3316..bf8510e 100644
--- a/src/sig.c
+++ b/src/sig.c
@@ -3,16 +3,17 @@
#include <signal.h>
/**
- @file sig.c
- @author djb
- @source qmail
- @brief signal handling functions
+ @file sig.c
+ @author djb
+ @source qmail
+ @brief signal handling functions
*/
void sig_alarmblock()
{
sig_block(SIGALRM);
}
+
void sig_alarmunblock()
{
sig_unblock(SIGALRM);
@@ -21,10 +22,12 @@ void sig_alarmcatch(f) void (*f)();
{
sig_catch(SIGALRM, f);
}
+
void sig_alarmdefault()
{
sig_catch(SIGALRM, SIG_DFL);
}
+
int sig_alarm = SIGALRM;
void sig_block(int sig)
@@ -70,16 +73,19 @@ void sig_pipeignore()
{
sig_catch(SIGPIPE, SIG_IGN);
}
+
void sig_pipedefault()
{
sig_catch(SIGPIPE, SIG_DFL);
}
+
int sig_pipe = SIGPIPE;
void sig_childblock()
{
sig_block(SIGCHLD);
}
+
void sig_childunblock()
{
sig_unblock(SIGCHLD);
@@ -88,16 +94,19 @@ void sig_childcatch(f) void (*f)();
{
sig_catch(SIGCHLD, f);
}
+
void sig_childdefault()
{
sig_catch(SIGCHLD, SIG_DFL);
}
+
int sig_child = SIGCHLD;
void sig_hangupblock()
{
sig_block(SIGHUP);
}
+
void sig_hangupunblock()
{
sig_unblock(SIGHUP);
@@ -106,16 +115,19 @@ void sig_hangupcatch(f) void (*f)();
{
sig_catch(SIGHUP, f);
}
+
void sig_hangupdefault()
{
sig_catch(SIGHUP, SIG_DFL);
}
+
int sig_hangup = SIGHUP;
void sig_termblock()
{
sig_block(SIGTERM);
}
+
void sig_termunblock()
{
sig_unblock(SIGTERM);
@@ -124,10 +136,12 @@ void sig_termcatch(f) void (*f)();
{
sig_catch(SIGTERM, f);
}
+
void sig_termdefault()
{
sig_catch(SIGTERM, SIG_DFL);
}
+
int sig_term = SIGTERM;
void sig_bugcatch(void (*f)())
@@ -144,6 +158,7 @@ void sig_bugcatch(void (*f)())
sig_catch(SIGEMT, f);
#endif
}
+
void (*sig_defaulthandler)() = SIG_DFL;
void sig_miscignore()
@@ -160,6 +175,7 @@ void sig_miscignore()
sig_catch(SIGXFSZ, SIG_IGN);
#endif
}
+
void (*sig_ignorehandler)() = SIG_IGN;
int sig_cont = SIGCONT;