This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.golden
Recipients Andrey.Morozov, pitrou, tim.golden
Date 2011-12-04.10:41:34
SpamBayes Score 0.00083711173
Marked as misclassified No
Message-id <4EDB4E59.7000207@timgolden.me.uk>
In-reply-to <4EDAA03C.9050003@timgolden.me.uk>
Content
OK, the long and short is that spwaning a process without passing
in SystemRoot is asking for trouble. There's a blog post here
which gives an example:

http://jpassing.com/2009/12/28/the-hidden-danger-of-forgetting-to-specify-systemroot-in-a-custom-environment-block/

And, certainly this works:

import os
import subprocess
subprocess.Popen(
     "notepad.exe",
     env={"SystemRoot" : os.environ['SystemRoot']}
)

I'm not quite sure what approach we should take in the subprocess
module. Is it a docs warning? Should we refuse to proceed if there's
no SystemRoot? Is it the caller's responsibility?
I'll ask on python-dev to gather opinions.
History
Date User Action Args
2011-12-04 10:41:36tim.goldensetrecipients: + tim.golden, pitrou, Andrey.Morozov
2011-12-04 10:41:34tim.goldenlinkissue13524 messages
2011-12-04 10:41:34tim.goldencreate