]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 7.4.1822 v7.4.1822
authorBram Moolenaar <Bram@vim.org>
Sun, 8 May 2016 07:40:51 +0000 (09:40 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 8 May 2016 07:40:51 +0000 (09:40 +0200)
Problem:    Redirecting stdout of a channel to "null" doesn't work. (Nicola)
Solution:   Correct the file descriptor number.

src/os_unix.c
src/version.c

index f2f2ca4c9a11cf021f1d36f419080f5f853f9973..f7b5ae4b112e5def3de9da1717639311b486cd5d 100644 (file)
@@ -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);
 
index 56e9a3e61a8640a44527e6aad6cfed399b40730c..36eba983f79b491b3c1199ef83cdba62b6753017 100644 (file)
@@ -753,6 +753,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1822,
 /**/
     1821,
 /**/