]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Simplify SIGUR1 handling.
authorAndre Noll <maan@systemlinux.org>
Tue, 11 Dec 2007 16:31:24 +0000 (17:31 +0100)
committerAndre Noll <maan@systemlinux.org>
Tue, 11 Dec 2007 16:31:24 +0000 (17:31 +0100)
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
server.c

index aed9e6a0a34ab94ea6fce7b5708ac0b6e228efd2..68cc5ab55f7c8da0362bb1ae9aa018014a97ede9 100644 (file)
--- 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);
index d48a0c91e391e7238c551602dacc56a0f378899b..93de8cc35d26c4e9f0e2277a236f47de905d5a6a 100644 (file)
--- 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);
        }