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 0824902..c8064f2 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);
     }