From 795ffc5e62e8ba383575dbcd9943a580d4bd3358 Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Tue, 9 Jul 2024 15:50:21 +0200 Subject: formatting changes Manual format adjustments. Comment adjustments. Remove usage of the register keyword. --- src/sig.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'src/sig.c') 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 /** - @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; -- cgit v1.2.3