X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=secnet.git;a=blobdiff_plain;f=process.c;h=64683159ccc40be20132f5bc8d40beb89ed325c1;hp=0a7a0f262164ab75f8d908bfe2f0181a125ecc05;hb=2ca9a1b7bc10d8d84f3b6227160cf7329aacbd9b;hpb=5a8a70536e4fa79612405a88c50743976abb2d50 diff --git a/process.c b/process.c index 0a7a0f2..6468315 100644 --- 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(®istered); 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) {