[docs] [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

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>

More information about the docs mailing list