From 509d26f95b0d376f8fc7502b8ffd275a33ffa48f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= Date: Mon, 9 Jan 2017 10:22:50 -0600 Subject: [PATCH] bitbake: bb/server/process.py: ProcessEventQueue add close of _writer pipe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Call explicity close in _writer to avoid fd leakage because isn't called on Queue.close() [YOCTO #10873] (Bitbake rev: 12dfac442d2d5674198485fbeb708a01d215c576) Signed-off-by: Aníbal Limón Signed-off-by: Richard Purdie --- bitbake/lib/bb/server/process.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index c9dfb4fa23..c3c1450a50 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py @@ -233,6 +233,9 @@ class BitBakeProcessServerConnection(BitBakeBaseServerConnection): self.ui_channel.close() self.event_queue.close() self.event_queue.setexit() + # XXX: Call explicity close in _writer to avoid + # fd leakage because isn't called on Queue.close() + self.event_queue._writer.close() # Wrap Queue to provide API which isn't server implementation specific class ProcessEventQueue(multiprocessing.queues.Queue): @@ -264,7 +267,6 @@ class ProcessEventQueue(multiprocessing.queues.Queue): sys.exit(1) return None - class BitBakeServer(BitBakeBaseServer): def initServer(self, single_use=True): # establish communication channels. We use bidirectional pipes for