doc: Documented htpipe.
[ashd.git] / src / errlogger.c
index 7a50c2c..bc0d0e5 100644 (file)
@@ -22,6 +22,7 @@
 #include <unistd.h>
 #include <string.h>
 #include <errno.h>
+#include <signal.h>
 
 static int prio;
 
@@ -57,7 +58,7 @@ int main(int argc, char **argv)
     name = NULL;
     prio = LOG_WARNING;
     fac = LOG_DAEMON;
-    while((c = getopt(argc, argv, "hn:p:f:")) >= 0) {
+    while((c = getopt(argc, argv, "+hn:p:f:")) >= 0) {
        switch(c) {
        case 'n':
            name = optarg;
@@ -141,6 +142,7 @@ int main(int argc, char **argv)
        exit(127);
     }
     close(pfd[1]);
+    signal(SIGCHLD, SIG_IGN);
     logloop(pfd[0]);
     return(0);
 }