jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.160

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