[bitbake-devel] [PATCH 1/2] bb/server/process.py: ProcessEventQueue add close of _writer pipe
Aníbal Limón
anibal.limon at linux.intel.com
Mon Jan 9 16:22:50 UTC 2017
Call explicity close in _writer to avoid fd leakage because isn't
called on Queue.close()
[YOCTO #10873]
Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
---
lib/bb/server/process.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index c9dfb4f..c3c1450 100644
--- a/lib/bb/server/process.py
+++ b/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
--
2.1.4
More information about the bitbake-devel
mailing list