Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Commit

Permalink
Merge pull request #658 from gamechanger/tnt-file-handles
Browse files Browse the repository at this point in the history
Close file descriptors on all subprocess calls
  • Loading branch information
thieman committed Mar 4, 2016
2 parents 8e2af4e + 75d7a16 commit 17e07e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dusty/subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 17e07e9

Please sign in to comment.