[docs] [issue30798] Document that subprocess.Popen does not set PWD

R. David Murray report at bugs.python.org
Sat Jul 1 19:44:27 EDT 2017


R. David Murray added the comment:

If you pass shell=True, PWD gests set, because it is a shell variable and the shell sets it.  If you don't, it doesn't, just like all the other shell-maintained variables.  I'm not sure it is worth calling out specifically in the Popen docs, myself; it is one consequence among *many* of calling a program directly rather than through a shell.  (Note that if a shell is involved at any point, PWD gets set, so it is only binary programs that require that they be called from a shell that are at issue.)

Furthermore, it is not obvious that even all shells set PWD, although I believe that most do.

----------
nosy: +r.david.murray

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30798>
_______________________________________


More information about the docs mailing list