Ignore SIGPIPE (non-inheritably) in dirplex, patplex, userplex and callscgi.
[ashd.git] / src / patplex.c
index d296e04..8394406 100644 (file)
@@ -438,7 +438,7 @@ static void serve(struct hthead *req, int fd)
        return;
     }
     
-    if(childhandle(ch, req, fd))
+    if(childhandle(ch, req, fd, NULL, NULL))
        simpleerror(fd, 500, "Server Error", "The request handler crashed.");
 }
 
@@ -513,6 +513,7 @@ int main(int argc, char **argv)
     }
     signal(SIGCHLD, SIG_IGN);
     signal(SIGHUP, sighandler);
+    signal(SIGPIPE, sighandler);
     while(1) {
        if(reload) {
            reloadconf(argv[optind]);