diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-04-05 15:35:01 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-04-05 15:35:01 +0300 |
commit | 10fcfaf0b5db1ad975f81fa7eba8dd8fa39931db (patch) | |
tree | e4755427ad2548d7bc720931b0b6a908ef3fe93a | |
parent | 6639d5376f5d94f48ba753544adeeb958cef0590 (diff) | |
download | jumper-10fcfaf0b5db1ad975f81fa7eba8dd8fa39931db.tar.gz jumper-10fcfaf0b5db1ad975f81fa7eba8dd8fa39931db.tar.bz2 |
Fix descriptor leak
* src/progman.c (progman_start): Close pipe ends.
-rw-r--r-- | src/progman.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/progman.c b/src/progman.c index 0f48b37..d59b7b7 100644 --- a/src/progman.c +++ b/src/progman.c @@ -540,2 +540,6 @@ progman_start(int type, listener_t *lp, struct grecs_locus *loc, /* master */ + if (options & OPT_STDERR) + close(redir_fd[REDIR_ERR]); + if (options & OPT_STDOUT) + close(redir_fd[REDIR_OUT]); process_register(lp, type, timeout, pid, redir_pid); |