summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Likins <alikins@grimlock.devel.redhat.com>2008-09-02 15:04:33 -0400
committerAdrian Likins <alikins@grimlock.devel.redhat.com>2008-09-02 15:04:33 -0400
commit00bdaf4f60f2b5d11de87179a4671674f37d0767 (patch)
treee6044df64db8f09f5f6c98300ce30b0a6712a72e
parent39b02e465e381340bcd86f774235cb5c283b75f9 (diff)
downloadfunc-00bdaf4f60f2b5d11de87179a4671674f37d0767.tar.gz
func-00bdaf4f60f2b5d11de87179a4671674f37d0767.tar.xz
func-00bdaf4f60f2b5d11de87179a4671674f37d0767.zip
make command.run invoke sub_process with closed_fds=True
so new processed dont inherit any fd's from func FIXME: we should probably do the same for all uses of sub_process
-rw-r--r--func/minion/modules/command.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/func/minion/modules/command.py b/func/minion/modules/command.py
index 25a1aab..4706f30 100644
--- a/func/minion/modules/command.py
+++ b/func/minion/modules/command.py
@@ -31,10 +31,11 @@ class Command(func_module.FuncModule):
if env:
cmdref = sub_process.Popen(command.split(), stdout=sub_process.PIPE,
- stderr=sub_process.PIPE, shell=False, env=env)
+ stderr=sub_process.PIPE, shell=False,
+ close_fds=True, env=env)
else:
cmdref = sub_process.Popen(command.split(), stdout=sub_process.PIPE,
- stderr=sub_process.PIPE, shell=False)
+ stderr=sub_process.PIPE, shell=False, close_fds=True)
data = cmdref.communicate()
return (cmdref.returncode, data[0], data[1])