Commit d65cfab1 authored by Julien Muchembled's avatar Julien Muchembled

Make sure FDs are closed before spawning subprocesses

This is not the default with Python 2.
parent c02b2dd2
......@@ -262,7 +262,7 @@ class Recipe(object):
"""Run the given ``cmd`` in a child process."""
log = logging.getLogger(self.name)
try:
retcode = subprocess.call(cmd, shell=True, env=self.augmented_environment())
retcode = subprocess.call(cmd, shell=True, env=self.augmented_environment(), close_fds=True)
if retcode < 0:
log.error('Command received signal %s: %s' % (-retcode, cmd))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment