Close file descriptors when calling a script.

pull/7/head
Ferry Boender 9 years ago
parent 12a4122d91
commit 41f9ef4f6c
  1. 6
      src/formconfig.py

@ -96,7 +96,8 @@ class FormConfig(object):
proc = subprocess.Popen(form.script, shell=True,
stdout=stdout,
stderr=stderr,
env=env)
env=env,
close_fds=True)
stdout, stderr = proc.communicate(input)
return proc.returncode
else:
@ -104,7 +105,8 @@ class FormConfig(object):
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
env=env)
env=env,
close_fds=True)
stdout, stderr = proc.communicate()
return {
'stdout': stdout,

Loading…
Cancel
Save