diff options
author | Max Kellermann <max@duempel.org> | 2008-12-30 19:32:12 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-12-30 19:32:12 +0100 |
commit | a1434914a7ec13fd160cf790228592505377b093 (patch) | |
tree | 85a771f1f121d2c591d3092122dab3de514ebeab /src/sig_handlers.c | |
parent | 71e7ce5d8e3153342494685d60d7ff16d9b29101 (diff) | |
download | mpd-a1434914a7ec13fd160cf790228592505377b093.tar.gz mpd-a1434914a7ec13fd160cf790228592505377b093.tar.xz mpd-a1434914a7ec13fd160cf790228592505377b093.zip |
sig_handlers: removed unused functions
Most of these functions were obsoleted when we switched to threaded
MPD.
Diffstat (limited to 'src/sig_handlers.c')
-rw-r--r-- | src/sig_handlers.c | 50 |
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) ; -} |