summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2017-01-09 10:22:50 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-23 15:42:25 +0000
commit12dfac442d2d5674198485fbeb708a01d215c576 (patch)
tree8d0f7d8eb88cb5e0907a693c9634c655dd420e91
parent43668657a8a679acc957e26e6fd8f47ab4cb3da8 (diff)
downloadbitbake-contrib-12dfac442d2d5674198485fbeb708a01d215c576.tar.gz
bitbake-contrib-12dfac442d2d5674198485fbeb708a01d215c576.tar.bz2
bitbake-contrib-12dfac442d2d5674198485fbeb708a01d215c576.zip
bb/server/process.py: ProcessEventQueue add close of _writer pipe
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@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/server/process.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index c9dfb4fa23..c3c1450a50 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