aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-12-30 19:32:12 +0100
committerMax Kellermann <max@duempel.org>2008-12-30 19:32:12 +0100
commita1434914a7ec13fd160cf790228592505377b093 (patch)
tree85a771f1f121d2c591d3092122dab3de514ebeab /src
parent71e7ce5d8e3153342494685d60d7ff16d9b29101 (diff)
downloadmpd-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 '')
-rw-r--r--src/sig_handlers.c50
-rw-r--r--src/sig_handlers.h12
-rw-r--r--src/signal_check.c6
-rw-r--r--src/signal_check.h1
4 files changed, 0 insertions, 69 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) ;
-}
diff --git a/src/sig_handlers.h b/src/sig_handlers.h
index b34a941d9..a7a2c6f02 100644
--- a/src/sig_handlers.h
+++ b/src/sig_handlers.h
@@ -23,16 +23,4 @@ int handlePendingSignals(void);
void initSigHandlers(void);
-void finishSigHandlers(void);
-
-void ignoreSignals(void);
-
-void blockSignals(void);
-
-void unblockSignals(void);
-
-void blockTermSignal(void);
-
-void unblockTermSignal(void);
-
#endif
diff --git a/src/signal_check.c b/src/signal_check.c
index e759759e2..b584a2585 100644
--- a/src/signal_check.c
+++ b/src/signal_check.c
@@ -44,12 +44,6 @@ void signal_handle(int sig)
set_signal_handler(sig, mpd_signal_handler);
}
-void signal_unhandle(int sig)
-{
- signal_clear(sig);
- set_signal_handler(sig, SIG_DFL);
-}
-
int signal_is_pending(int sig)
{
return caught_signals[sig];
diff --git a/src/signal_check.h b/src/signal_check.h
index d241cb01f..118b3d730 100644
--- a/src/signal_check.h
+++ b/src/signal_check.h
@@ -21,7 +21,6 @@
#define MPD_SIGNAL_CHECK_H
void signal_handle(int sig);
-void signal_unhandle(int sig);
int signal_is_pending(int sig);
void signal_clear(int sig);