]> git.ipfire.org Git - thirdparty/FORT-validator.git/commitdiff
init: Remove SIGPIPE SIG_IGN override during RTR server startup
authorAlberto Leiva Popper <ydahhrk@gmail.com>
Fri, 2 Jul 2021 23:56:34 +0000 (18:56 -0500)
committerAlberto Leiva Popper <ydahhrk@gmail.com>
Fri, 2 Jul 2021 23:56:34 +0000 (18:56 -0500)
Because it's now redundant.

As discovered in #49, SIGPIPE is total bullshit in all circumstances, no
exceptions, so there's now a global SIGPIPE SIG_IGN override, rendering
this one useless.

I guess we now know why #49 never triggered on server mode.

src/rtr/rtr.c

index 4d39a8618a26a1b3e65bb38d3c24acbcf960fe07..6855c50e74950fbbbb3b87e31205de8ea138fb85 100644 (file)
@@ -3,7 +3,6 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <netdb.h>
-#include <signal.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -582,15 +581,8 @@ static int
 start_server_thread(void)
 {
        struct fd_node *node;
-       struct sigaction ign;
        int error;
 
-       /* Ignore SIGPIPES, they're handled apart */
-       ign.sa_handler = SIG_IGN;
-       ign.sa_flags = 0;
-       sigemptyset(&ign.sa_mask);
-       sigaction(SIGPIPE, &ign, NULL);
-
        SLIST_FOREACH(node, &fds, next) {
                error = listen(node->id, config_get_server_queue());
                if (error)