From b46dd218f90646441998f975c9b5515a5521c9d5 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 11 Dec 2007 17:31:24 +0100 Subject: [PATCH] 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. --- command.c | 1 - server.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) 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); } -- 2.39.5