aboutsummaryrefslogtreecommitdiffstats
path: root/classes/utils.bbclass
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-06-08 07:46:58 -0700
committerChris Larson <chris_larson@mentor.com>2010-06-10 11:35:01 -0700
commitf6ac2d399aae6c6aad9b24a96abc860229c4a603 (patch)
treec20f84342c0fdbfcfe06055b6f44659a23cca049 /classes/utils.bbclass
parent4d060ecf3da4ee27547e7456df1198a450461ab0 (diff)
downloadopenembedded-f6ac2d399aae6c6aad9b24a96abc860229c4a603.tar.gz
utils.bbclass: set close_fds=True by default for the popen helper
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'classes/utils.bbclass')
-rw-r--r--classes/utils.bbclass7
1 files changed, 5 insertions, 2 deletions
diff --git a/classes/utils.bbclass b/classes/utils.bbclass
index 4e352e3b9c..64d6c231ec 100644
--- a/classes/utils.bbclass
+++ b/classes/utils.bbclass
@@ -61,13 +61,16 @@ def oe_popen(d, cmd, **kwargs):
d.setVar("__oe_popen_env", env)
kwargs["env"] = env
+ kwargs["close_fds"] = True
kwargs["preexec_fn"] = subprocess_setup
return Popen(cmd, **kwargs)
-def oe_system(d, cmd):
+def oe_system(d, cmd, **kwargs):
""" Popen based version of os.system. """
- return oe_popen(d, cmd, shell=True).wait()
+ if not "shell" in kwargs:
+ kwargs["shell"] = True
+ return oe_popen(d, cmd, **kwargs).wait()
# for MD5/SHA handling
def base_chk_load_parser(config_paths):