X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/0ca6d097e900ff5d46ffc4968a468fefecb345af..ad08c366a19e95d19e8ee5d66b050530339561e4:/server/trackdb.c diff --git a/server/trackdb.c b/server/trackdb.c index b0eb383..8cfd71f 100644 --- a/server/trackdb.c +++ b/server/trackdb.c @@ -157,22 +157,12 @@ static int reap_db_deadlock(ev_source attribute((unused)) *ev, static pid_t subprogram(ev_source *ev, const char *prog, int outputfd) { pid_t pid; - int lfd; /* If we're in the background then trap subprocess stdout/stderr */ - if(!isatty(2)) - lfd = logfd(ev, prog); - else - lfd = -1; if(!(pid = xfork())) { exitfn = _exit; ev_signal_atfork(ev); signal(SIGPIPE, SIG_DFL); - if(lfd != -1) { - xdup2(lfd, 1); - xdup2(lfd, 2); - xclose(lfd); - } if(outputfd != -1) { xdup2(outputfd, 1); xclose(outputfd); @@ -186,7 +176,6 @@ static pid_t subprogram(ev_source *ev, const char *prog, (char *)0); fatal(errno, "error invoking %s", prog); } - if(lfd != -1) xclose(lfd); return pid; }