]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.160 v7.4.160
authorBram Moolenaar <Bram@vim.org>
Fri, 24 Jan 2014 18:55:37 +0000 (19:55 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 24 Jan 2014 18:55:37 +0000 (19:55 +0100)
Problem:    Win32: Crash when executing external command.
Solution:   Only close the handle when it was created. (Yasuhiro Matsumoto)

src/os_win32.c
src/version.c

index e9ec5f7c06da557723140d3242012b632a50476d..844b70a974dad245665476a869e53602688314ee 100644 (file)
@@ -4627,6 +4627,7 @@ mch_call_shell(
            DWORD               flags = CREATE_NEW_CONSOLE;
            char_u              *p;
 
+           ZeroMemory(&si, sizeof(si));
            si.cb = sizeof(si);
            si.lpReserved = NULL;
            si.lpDesktop = NULL;
@@ -4723,9 +4724,9 @@ mch_call_shell(
            if (newcmd != cmdbase)
                vim_free(newcmd);
 
-           if (si.hStdInput != NULL)
+           if (si.dwFlags == STARTF_USESTDHANDLES && si.hStdInput != NULL)
            {
-               /* Close the handle to \\.\NUL */
+               /* Close the handle to \\.\NUL created above. */
                CloseHandle(si.hStdInput);
            }
            /* Close the handles to the subprocess, so that it goes away */
index e8bfd9ae959512cd40f5b389364d7d257e30f568..974c8f88fe916412e03a3afc2e2bb1709bb5218f 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    160,
 /**/
     159,
 /**/