From 75d7a1609e7e65beb2e724fd881344d8e0f05ff2 Mon Sep 17 00:00:00 2001 From: Travis Thieman Date: Fri, 4 Mar 2016 09:57:04 -0500 Subject: [PATCH] Close file descriptors on all subprocess calls --- dusty/subprocess.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dusty/subprocess.py b/dusty/subprocess.py index dde4023b..3709ef95 100644 --- a/dusty/subprocess.py +++ b/dusty/subprocess.py @@ -33,7 +33,7 @@ def run_subprocess(fn, shell_args, demote=True, env=None, **kwargs): passed_env = None if demote: kwargs['preexec_fn'] = _demote_to_user(get_config_value(constants.CONFIG_MAC_USERNAME_KEY)) - output = fn(shell_args, env=passed_env, **kwargs) + output = fn(shell_args, env=passed_env, close_fds=True, **kwargs) return output def call_demoted(shell_args, env=None, redirect_stderr=False):