Added a proper SIGHUP handler to patplex.
[ashd.git] / lib / proc.c
index 957cfce..2e61e92 100644 (file)
@@ -84,7 +84,7 @@ int sendfd(int sock, int fd, char *data, size_t datalen)
 int recvfd(int sock, char **data, size_t *datalen)
 {
     int ret, fd;
-    char *buf, cbuf[1024];;
+    char *buf, cbuf[1024];
     struct msghdr msg;
     struct cmsghdr *cmsg;
     struct iovec bufvec;
@@ -163,6 +163,5 @@ pid_t stdforkserve(char **argv, struct hthead *req, int fd)
        flog(LOG_WARNING, "could not exec child program %s: %s", argv[0], strerror(errno));
        exit(127);
     }
-    close(fd);
     return(pid);
 }