]> git.dolda2000.com Git - ashd.git/commitdiff
htparser: Ignore SIGPIPE.
authorFredrik Tolf <fredrik@dolda2000.com>
Fri, 3 Sep 2010 06:03:12 +0000 (08:03 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Fri, 3 Sep 2010 06:03:12 +0000 (08:03 +0200)
Shouldn't *really* be necessary, but it seems hard to ensure that
gnutls uses MSG_NOSIGNAL, and it's not as if it really hurts. At least
not a lot.

src/htparser.c

index 08249021009f34708fa07ea380a50f275512f340..c8064f23fc0ae9d649052815e817aa3beeb02d46 100644 (file)
@@ -22,6 +22,7 @@
 #include <string.h>
 #include <sys/socket.h>
 #include <pwd.h>
+#include <sys/signal.h>
 #include <errno.h>
 
 #ifdef HAVE_CONFIG_H
@@ -483,6 +484,7 @@ int main(int argc, char **argv)
            exit(1);
        }
     }
+    signal(SIGPIPE, SIG_IGN);
     if(daemonize) {
        daemon(0, 0);
     }