summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server
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 22:38:49 +0000
commit509d26f95b0d376f8fc7502b8ffd275a33ffa48f (patch)
tree749c5df5987ce53529ba31559990f2f86c421f40 /bitbake/lib/bb/server
parenta5a51304d15d09213042bfe6a2f9976c8854f1af (diff)
downloadpoky-509d26f95b0d376f8fc7502b8ffd275a33ffa48f.tar.gz
bitbake: 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] (Bitbake rev: 12dfac442d2d5674198485fbeb708a01d215c576) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/server')
-rw-r--r--bitbake/lib/bb/server/process.py4
1 files changed, 3 insertions, 1 deletions
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):
233 self.ui_channel.close() 233 self.ui_channel.close()
234 self.event_queue.close() 234 self.event_queue.close()
235 self.event_queue.setexit() 235 self.event_queue.setexit()
236 # XXX: Call explicity close in _writer to avoid
237 # fd leakage because isn't called on Queue.close()
238 self.event_queue._writer.close()
236 239
237# Wrap Queue to provide API which isn't server implementation specific 240# Wrap Queue to provide API which isn't server implementation specific
238class ProcessEventQueue(multiprocessing.queues.Queue): 241class ProcessEventQueue(multiprocessing.queues.Queue):
@@ -264,7 +267,6 @@ class ProcessEventQueue(multiprocessing.queues.Queue):
264 sys.exit(1) 267 sys.exit(1)
265 return None 268 return None
266 269
267
268class BitBakeServer(BitBakeBaseServer): 270class BitBakeServer(BitBakeBaseServer):
269 def initServer(self, single_use=True): 271 def initServer(self, single_use=True):
270 # establish communication channels. We use bidirectional pipes for 272 # establish communication channels. We use bidirectional pipes for