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