diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-01-24 19:55:37 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-01-24 19:55:37 +0100 |
commit | fcc3f46735b8c47fde0961228ca1fdd20cb709a0 (patch) | |
tree | 3638cae5ea3cb84f3ad2f3aeb77b1e9e7ccbe3b4 | |
parent | 361aa50547249b76097da86873f7c981e3918049 (diff) | |
download | vim-git-fcc3f46735b8c47fde0961228ca1fdd20cb709a0.tar.gz |
updated for version 7.4.160v7.4.160
Problem: Win32: Crash when executing external command.
Solution: Only close the handle when it was created. (Yasuhiro Matsumoto)
-rw-r--r-- | src/os_win32.c | 5 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/os_win32.c b/src/os_win32.c index e9ec5f7c0..844b70a97 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -4627,6 +4627,7 @@ mch_call_shell( DWORD flags = CREATE_NEW_CONSOLE; char_u *p; + ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); si.lpReserved = NULL; si.lpDesktop = NULL; @@ -4723,9 +4724,9 @@ mch_call_shell( if (newcmd != cmdbase) vim_free(newcmd); - if (si.hStdInput != NULL) + if (si.dwFlags == STARTF_USESTDHANDLES && si.hStdInput != NULL) { - /* Close the handle to \\.\NUL */ + /* Close the handle to \\.\NUL created above. */ CloseHandle(si.hStdInput); } /* Close the handles to the subprocess, so that it goes away */ diff --git a/src/version.c b/src/version.c index e8bfd9ae9..974c8f88f 100644 --- a/src/version.c +++ b/src/version.c @@ -739,6 +739,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 160, +/**/ 159, /**/ 158, |