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