Added callbacks to handle child process initialization.
[ashd.git] / src / patplex.c
index 3f22d73..04b7a10 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.");
 }
 
@@ -519,6 +519,8 @@ int main(int argc, char **argv)
            reload = 0;
        }
        if((fd = recvreq(0, &req)) < 0) {
+           if(errno == EINTR)
+               continue;
            if(errno != 0)
                flog(LOG_ERR, "recvreq: %s", strerror(errno));
            break;