Message148850
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. |
|
Date |
User |
Action |
Args |
2011-12-04 10:41:36 | tim.golden | set | recipients:
+ tim.golden, pitrou, Andrey.Morozov |
2011-12-04 10:41:34 | tim.golden | link | issue13524 messages |
2011-12-04 10:41:34 | tim.golden | create | |
|