From: Andre Noll Date: Tue, 11 Dec 2007 16:31:24 +0000 (+0100) Subject: Simplify SIGUR1 handling. X-Git-Tag: v0.3.0~59^2~3^2~1 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=b46dd218f90646441998f975c9b5515a5521c9d5;p=paraslash.git Simplify SIGUR1 handling. There's no need to catch this signal in server.c as it is unly used to notify its children. So just ignore it. --- diff --git a/command.c b/command.c index aed9e6a0..68cc5ab5 100644 --- a/command.c +++ b/command.c @@ -696,7 +696,6 @@ int handle_connect(int fd, const char *peername) signal(SIGINT, SIG_DFL); signal(SIGTERM, SIG_DFL); signal(SIGHUP, SIG_DFL); - signal(SIGUSR1, SIG_IGN); /* we need a blocking fd here as recv() might return EAGAIN otherwise. */ ret = mark_fd_blocking(fd); diff --git a/server.c b/server.c index d48a0c91..93de8cc3 100644 --- a/server.c +++ b/server.c @@ -292,9 +292,9 @@ static void setup_signal_handling(void) ret += para_install_sighandler(SIGTERM); ret += para_install_sighandler(SIGHUP); ret += para_install_sighandler(SIGCHLD); - ret += para_install_sighandler(SIGUSR1); signal(SIGPIPE, SIG_IGN); - if (ret != 5) { + signal(SIGUSR1, SIG_IGN); + if (ret != 4) { PARA_EMERG_LOG("%s", "could not install signal handlers\n"); exit(EXIT_FAILURE); }