summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-10-03 13:57:13 +0200
committerBram Moolenaar <Bram@vim.org>2020-10-03 13:57:13 +0200
commit794771cfd83af2a0d1926bed301e784447e7290b (patch)
tree972c890d396196ebda05d8b2a52bfc0c18fc440e
parentc1f0066b642fb62e37b300033223ff3ee4aafcd6 (diff)
downloadvim-git-794771cfd83af2a0d1926bed301e784447e7290b.tar.gz
patch 8.2.1790: MS-Windows with Python: crash when executed from Vifmv8.2.1790
Problem: MS-Windows with Python: crash when executed from Vifm. Solution: Use NUL instead of CONIN. (Ken Takata, closes #7061, closes #7053)
-rw-r--r--src/if_python3.c8
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/if_python3.c b/src/if_python3.c
index 214ba2983..15c1d9973 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -909,7 +909,7 @@ static wchar_t *py_home_buf = NULL;
#if defined(MSWIN) && (PY_VERSION_HEX >= 0x030500f0)
// Python 3.5 or later will abort inside Py_Initialize() when stdin is
-// redirected. Reconnect stdin to CONIN$.
+// redirected. Reconnect stdin to NUL.
// Note that the python DLL is linked to its own stdio DLL which can be
// differ from Vim's stdio.
static void
@@ -938,11 +938,11 @@ reset_stdin(void)
pyfreopen = (void*)GetProcAddress(hpystdiodll, "freopen");
}
- // Reconnect stdin to CONIN$.
+ // Reconnect stdin to NUL.
if (pyfreopen)
- pyfreopen("CONIN$", "r", py__acrt_iob_func(0));
+ pyfreopen("NUL", "r", py__acrt_iob_func(0));
else
- freopen("CONIN$", "r", stdin);
+ freopen("NUL", "r", stdin);
}
#else
# define reset_stdin()
diff --git a/src/version.c b/src/version.c
index 4280ac562..a9b6e5dab 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1790,
+/**/
1789,
/**/
1788,