8b9a1c
To: vim_dev@googlegroups.com
8b9a1c
Subject: Patch 7.4.160
8b9a1c
Fcc: outbox
8b9a1c
From: Bram Moolenaar <Bram@moolenaar.net>
8b9a1c
Mime-Version: 1.0
8b9a1c
Content-Type: text/plain; charset=UTF-8
8b9a1c
Content-Transfer-Encoding: 8bit
8b9a1c
------------
8b9a1c
8b9a1c
Patch 7.4.160
8b9a1c
Problem:    Win32: Crash when executing external command.
8b9a1c
Solution:   Only close the handle when it was created. (Yasuhiro Matsumoto)
8b9a1c
Files:	    src/os_win32.c
8b9a1c
8b9a1c
8b9a1c
*** ../vim-7.4.159/src/os_win32.c	2014-01-12 13:24:46.000000000 +0100
8b9a1c
--- src/os_win32.c	2014-01-24 19:54:35.778219160 +0100
8b9a1c
***************
8b9a1c
*** 4627,4632 ****
8b9a1c
--- 4627,4633 ----
8b9a1c
  	    DWORD		flags = CREATE_NEW_CONSOLE;
8b9a1c
  	    char_u		*p;
8b9a1c
  
8b9a1c
+ 	    ZeroMemory(&si, sizeof(si));
8b9a1c
  	    si.cb = sizeof(si);
8b9a1c
  	    si.lpReserved = NULL;
8b9a1c
  	    si.lpDesktop = NULL;
8b9a1c
***************
8b9a1c
*** 4723,4731 ****
8b9a1c
  	    if (newcmd != cmdbase)
8b9a1c
  		vim_free(newcmd);
8b9a1c
  
8b9a1c
! 	    if (si.hStdInput != NULL)
8b9a1c
  	    {
8b9a1c
! 		/* Close the handle to \\.\NUL */
8b9a1c
  		CloseHandle(si.hStdInput);
8b9a1c
  	    }
8b9a1c
  	    /* Close the handles to the subprocess, so that it goes away */
8b9a1c
--- 4724,4732 ----
8b9a1c
  	    if (newcmd != cmdbase)
8b9a1c
  		vim_free(newcmd);
8b9a1c
  
8b9a1c
! 	    if (si.dwFlags == STARTF_USESTDHANDLES && si.hStdInput != NULL)
8b9a1c
  	    {
8b9a1c
! 		/* Close the handle to \\.\NUL created above. */
8b9a1c
  		CloseHandle(si.hStdInput);
8b9a1c
  	    }
8b9a1c
  	    /* Close the handles to the subprocess, so that it goes away */
8b9a1c
*** ../vim-7.4.159/src/version.c	2014-01-23 22:45:54.608127182 +0100
8b9a1c
--- src/version.c	2014-01-24 19:52:46.946216170 +0100
8b9a1c
***************
8b9a1c
*** 740,741 ****
8b9a1c
--- 740,743 ----
8b9a1c
  {   /* Add new patch number below this line */
8b9a1c
+ /**/
8b9a1c
+     160,
8b9a1c
  /**/
8b9a1c
8b9a1c
-- 
8b9a1c
hundred-and-one symptoms of being an internet addict:
8b9a1c
209. Your house stinks because you haven't cleaned it in a week.
8b9a1c
8b9a1c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
8b9a1c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
8b9a1c
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
8b9a1c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///