X-Git-Url: http://www.dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fhtparser.c;h=503df99a719ffda1c859d19c0d929dd0745f88dc;hb=df96b2220cf1f738fdfc26236df1e91d5c89e078;hp=17ad93abc7234142a3e11e54a5bab85fd3dc93ad;hpb=43c58ba25e47635c8f44e6b1cbda9247219a16b5;p=ashd.git diff --git a/src/htparser.c b/src/htparser.c index 17ad93a..503df99 100644 --- a/src/htparser.c +++ b/src/htparser.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #ifdef HAVE_CONFIG_H @@ -453,7 +454,7 @@ int main(int argc, char **argv) usage(stderr); exit(1); } - if((plex = stdmkchild(argv + ++i)) < 0) { + if((plex = stdmkchild(argv + ++i, NULL, NULL)) < 0) { flog(LOG_ERR, "could not spawn root multiplexer: %s", strerror(errno)); return(1); } @@ -483,12 +484,14 @@ int main(int argc, char **argv) exit(1); } } + signal(SIGPIPE, SIG_IGN); if(daemonize) { daemon(0, 0); } - if(pidout != NULL) + if(pidout != NULL) { fprintf(pidout, "%i\n", getpid()); - fclose(pidout); + fclose(pidout); + } ioloop(); return(0); }