aboutsummaryrefslogtreecommitdiffstats
path: root/src/sig_handlers.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/sig_handlers.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/sig_handlers.c b/src/sig_handlers.c
index 4c1bc0442..d1b59b8e9 100644
--- a/src/sig_handlers.c
+++ b/src/sig_handlers.c
@@ -81,53 +81,3 @@ void initSigHandlers(void)
signal_handle(SIGTERM);
signal_handle(SIGHUP);
}
-
-void finishSigHandlers(void)
-{
- signal_unhandle(SIGINT);
- signal_unhandle(SIGUSR1);
- signal_unhandle(SIGTERM);
- signal_unhandle(SIGHUP);
-}
-
-void ignoreSignals(void)
-{
- struct sigaction sa;
-
- sa.sa_flags = 0;
- sigemptyset(&sa.sa_mask);
- sa.sa_handler = SIG_IGN;
- sa.sa_sigaction = NULL;
- while (sigaction(SIGPIPE, &sa, NULL) < 0 && errno == EINTR) ;
- while (sigaction(SIGCHLD, &sa, NULL) < 0 && errno == EINTR) ;
- while (sigaction(SIGUSR1, &sa, NULL) < 0 && errno == EINTR) ;
- while (sigaction(SIGINT, &sa, NULL) < 0 && errno == EINTR) ;
- while (sigaction(SIGTERM, &sa, NULL) < 0 && errno == EINTR) ;
- while (sigaction(SIGHUP, &sa, NULL) < 0 && errno == EINTR) ;
-}
-
-void blockSignals(void)
-{
- sigset_t sset;
-
- sigemptyset(&sset);
- sigaddset(&sset, SIGCHLD);
- sigaddset(&sset, SIGUSR1);
- sigaddset(&sset, SIGHUP);
- sigaddset(&sset, SIGINT);
- sigaddset(&sset, SIGTERM);
- while (sigprocmask(SIG_BLOCK, &sset, NULL) < 0 && errno == EINTR) ;
-}
-
-void unblockSignals(void)
-{
- sigset_t sset;
-
- sigemptyset(&sset);
- sigaddset(&sset, SIGCHLD);
- sigaddset(&sset, SIGUSR1);
- sigaddset(&sset, SIGHUP);
- sigaddset(&sset, SIGINT);
- sigaddset(&sset, SIGTERM);
- while (sigprocmask(SIG_UNBLOCK, &sset, NULL) < 0 && errno == EINTR) ;
-}