diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-05-08 09:40:51 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-05-08 09:40:51 +0200 |
commit | ea83bf06b92baeb6d68a10d8e8ffad289d31dae2 (patch) | |
tree | 9abc4597a8f5351d5050b28ba7fd9bef4f3ae8cf /src/os_unix.c | |
parent | 4ed6b2e2d7fd5959fb9b9f608935d47305c4bbe4 (diff) | |
download | vim-git-ea83bf06b92baeb6d68a10d8e8ffad289d31dae2.tar.gz |
patch 7.4.1822v7.4.1822
Problem: Redirecting stdout of a channel to "null" doesn't work. (Nicola)
Solution: Correct the file descriptor number.
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index f2f2ca4c9..f7b5ae4b1 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -5195,7 +5195,7 @@ mch_start_job(char **argv, job_T *job, jobopt_T *options UNUSED) /* set up stdout for the child */ if (use_null_for_out && null_fd >= 0) { - close(0); + close(1); ignored = dup(null_fd); } else @@ -5206,6 +5206,7 @@ mch_start_job(char **argv, job_T *job, jobopt_T *options UNUSED) ignored = dup(fd_out[1]); close(fd_out[1]); } + if (null_fd >= 0) close(null_fd); |