[issue35678] subprocess.check_output(): OSError: [WinError 87]
Eryk Sun
report at bugs.python.org
Tue Mar 5 03:24:31 EST 2019
Eryk Sun <eryksun at gmail.com> added the comment:
Geoff, we probably need a new issue for this, but first, please report the value of len(os.getcwd()) in a case where check_output() fails.
Prior to Windows 10, the working directory is limited to MAX_PATH - 2 (258) characters. (Windows uses the last two characters internally for a trailing backslash and a terminating null.) However, even with long-path support enabled in Windows 10, CreateProcessW retains the original WINAPI limit, which I assume is because the current implementation doesn't know whether the child supports long paths. If the inherited current directory exceeds this limit, CreateProcessW fails with ERROR_INVALID_PARAMETER (87).
----------
nosy: +eryksun
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35678>
_______________________________________
More information about the Python-bugs-list
mailing list