]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Close file descriptors when executing sub-processes
authorBob Kukura <rkukura@redhat.com>
Wed, 20 Feb 2013 21:12:24 +0000 (16:12 -0500)
committerBob Kukura <rkukura@redhat.com>
Wed, 20 Feb 2013 21:37:08 +0000 (16:37 -0500)
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

index 761c60c1005d67586d86af1949a1855a7354ee11..d6b7c6e257f3aa4d31628ef22b035cad66ce6069 100644 (file)
@@ -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):