chiark / gitweb /
resolver: Log reason for DNS resolution failure
[secnet.git] / process.c
index 0a7a0f262164ab75f8d908bfe2f0181a125ecc05..64683159ccc40be20132f5bc8d40beb89ed325c1 100644 (file)
--- a/process.c
+++ b/process.c
@@ -152,7 +152,7 @@ int sys_cmd(const char *path, const char *arg, ...)
                        path, arg, WTERMSIG(rv), strsignal(WTERMSIG(rv)),
                        WCOREDUMP(rv) ? " - core dumped" : "");
            else
-               Message(M_ERR, "sys_cmd(%s,%s,...) exited with wstat %#x",
+               Message(M_ERR, "sys_cmd(%s,%s,...) exited with wstat %#x\n",
                        path, arg, rv);
        }
     } else if (c==0) {
@@ -310,9 +310,7 @@ void start_signal_handling(void)
     sigemptyset(&registered);
     sigemptyset(&pending);
 
-    if (pipe(p)!=0) {
-       fatal_perror("start_signal_handling: pipe");
-    }
+    pipe_cloexec(p);
     spw=p[1];
     spr=p[0];
     if (fcntl(spw, F_SETFL, fcntl(spw, F_GETFL)|O_NONBLOCK)==-1) {