Close unneeded fds before execing CRM 114.

CRM 114 is being forked off of the gearman worker processes and as a
result has open fds for log files and tcp connections. CRM 114 should be
isolated from the fds so that it doesn't crash when they change
unexpectedly. Close the fds using the subprocess.Popen close_fds flag.

Change-Id: I4fbdf3564771be7d7a7e4c518e571634de576253
This commit is contained in:
Clark Boylan 2014-02-05 09:44:55 -08:00
parent 8a2ca3c689
commit 7dea09588f
1 changed files with 2 additions and 1 deletions

View File

@ -66,7 +66,8 @@ class CRM114Filter(object):
self.p = subprocess.Popen(args,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
stdin=subprocess.PIPE)
stdin=subprocess.PIPE,
close_fds=True)
def process(self, data):
if not self.p: