From e24b3891dee24ddffbae4d1a67ac03ec25928530 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 5 Feb 2014 09:44:55 -0800 Subject: [PATCH] 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 --- modules/log_processor/files/log-gearman-worker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/log_processor/files/log-gearman-worker.py b/modules/log_processor/files/log-gearman-worker.py index ea8bcd9051..64250991e6 100644 --- a/modules/log_processor/files/log-gearman-worker.py +++ b/modules/log_processor/files/log-gearman-worker.py @@ -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: