Blame SOURCES/7.4.160

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