[issue15533] subprocess.Popen(cwd) documentation: Posix vs Windows
Damon Atkins
report at bugs.python.org
Wed Jun 13 06:11:45 EDT 2018
Damon Atkins <damon.atkins at gmail.com> added the comment:
I see from this. That this is still an issue
https://github.com/python/cpython/blob/master/Lib/subprocess.py#L1146
Is it not a solution to
save current directory location
chdir(cwd) before calling _winapi.CreateProcess()
restore the original directory.
This will result in the cwd being searched for the executable, which most people would expect to happen. It seems CreateProcess does not change to cwd until after the file is checked for existence or loaded.
----------
nosy: +Damon Atkins
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue15533>
_______________________________________
More information about the Python-bugs-list
mailing list