chiark / gitweb /
site: Support multiple addresses
[secnet.git] / secnet.c
index 465a93fc260404cad1eb2070bf8df446013e87a9..7fabb1b50f473292f64a681d38b7fa43d0c4a59d 100644 (file)
--- a/secnet.c
+++ b/secnet.c
@@ -332,7 +332,8 @@ static void run(void)
                fatal("run: beforepoll_fn (%s) returns %d",i->desc,rv);
            }
            if (timeout<-1) {
-               fatal("run: beforepoll_fn (%s) set timeout to %d",timeout);
+               fatal("run: beforepoll_fn (%s) set timeout to %d",
+                     i->desc,timeout);
            }
            idx+=nfds;
            remain-=nfds;
@@ -402,9 +403,7 @@ static void become_daemon(void)
     }
     if (secnet_is_daemon) {
        /* stderr etc are redirected to the system/log facility */
-       if (pipe(errfds)!=0) {
-           fatal_perror("can't create pipe for stderr");
-       }
+       pipe_cloexec(errfds);
        if (dup2(errfds[1],0) < 0
            || dup2(errfds[1],1) < 0
            || dup2(errfds[1],2) < 0)