From 20e517dd2dd550a39c0f842c3e12c34a279d5962 Mon Sep 17 00:00:00 2001 From: Bob Kukura Date: Wed, 20 Feb 2013 16:12:24 -0500 Subject: [PATCH] Close file descriptors when executing sub-processes Pass close_fds=True to subprocess.Popen(), as is currently done in nova.utils.execute(). Fixes bug #1130735 Change-Id: Iec21873d7ef3957847f3b7365fadd613ccf1349d --- quantum/common/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/common/utils.py b/quantum/common/utils.py index 761c60c10..d6b7c6e25 100644 --- a/quantum/common/utils.py +++ b/quantum/common/utils.py @@ -114,7 +114,7 @@ def subprocess_popen(args, stdin=None, stdout=None, stderr=None, shell=False, env=None): return subprocess.Popen(args, shell=shell, stdin=stdin, stdout=stdout, stderr=stderr, preexec_fn=_subprocess_setup, - env=env) + close_fds=True, env=env) def parse_mappings(mapping_list, unique_values=True): -- 2.45.2