[PATCH 2/2] Close file descriptors when forking child processes
Vratislav Podzimek
vpodzime at redhat.com
Thu Dec 4 14:23:11 UTC 2014
Otherwise the may hold them open longer than we need/expect which may cause
various issues (e.g. umount() fails).
Related: rhbz#1083978
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
pyanaconda/iutil.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
index 526f153..f8e9af6 100644
--- a/pyanaconda/iutil.py
+++ b/pyanaconda/iutil.py
@@ -129,7 +129,8 @@ def _run_program(argv, root='/', stdin=None, stdout=None, env_prune=None, log_ou
stdin=stdin,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
- preexec_fn=chroot, cwd=root, env=env)
+ preexec_fn=chroot, cwd=root, env=env,
+ close_fds=1)
output_string = proc.communicate()[0]
if output_string:
--
1.9.3
More information about the anaconda-patches
mailing list