X-Git-Url: http://www.dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fpatplex.c;h=83944062966c65a25f84e6abb8b2b5437ea5f378;hb=fd735432ca61308348e1f1eb1b79a42e357aa0b7;hp=3f22d738b582e0263bdfb3f08cf24d0579fac5c2;hpb=3a42b6b1d0b8f9e8ce5c77e838e2573bbfabe593;p=ashd.git diff --git a/src/patplex.c b/src/patplex.c index 3f22d73..8394406 100644 --- a/src/patplex.c +++ b/src/patplex.c @@ -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,12 +513,15 @@ int main(int argc, char **argv) } signal(SIGCHLD, SIG_IGN); signal(SIGHUP, sighandler); + signal(SIGPIPE, sighandler); while(1) { if(reload) { reloadconf(argv[optind]); reload = 0; } if((fd = recvreq(0, &req)) < 0) { + if(errno == EINTR) + continue; if(errno != 0) flog(LOG_ERR, "recvreq: %s", strerror(errno)); break;