sig_handlers: removed unused functions

Most of these functions were obsoleted when we switched to threaded
MPD.
This commit is contained in:
Max Kellermann 2008-12-30 19:32:12 +01:00
parent 71e7ce5d8e
commit a1434914a7
4 changed files with 0 additions and 69 deletions

View File

@ -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) ;
}

View File

@ -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

View File

@ -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];

View File

@ -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);