diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-28 15:33:32 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-30 08:43:36 +0100 |
commit | 76b6cdf414ac813783646d0456865fd20d89195f (patch) | |
tree | 26dd641ce73958ea471ddb32d21017dd61983be2 /bitbake | |
parent | 8b7aa5bfd6a53444df60d789c6a7ed2387e7b4c1 (diff) | |
download | poky-76b6cdf414ac813783646d0456865fd20d89195f.tar.gz |
bitbake: process: Allow BBUIEventQueue to exit cleanly
Currently the monitoring thread exits with some error code or runs indefinitely. Allow
closure of the pipe its monitoring to have the thread exit cleanly/silently.
(Bitbake rev: 930d077637928213e13a07c78fee3bf7a8c37ebf)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/server/process.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index 8a7c43160a..3d9077fd07 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py | |||
@@ -499,9 +499,14 @@ class BBUIEventQueue: | |||
499 | def startCallbackHandler(self): | 499 | def startCallbackHandler(self): |
500 | bb.utils.set_process_name("UIEventQueue") | 500 | bb.utils.set_process_name("UIEventQueue") |
501 | while True: | 501 | while True: |
502 | self.reader.wait() | 502 | try: |
503 | event = self.reader.get() | 503 | self.reader.wait() |
504 | self.queue_event(event) | 504 | event = self.reader.get() |
505 | self.queue_event(event) | ||
506 | except EOFError: | ||
507 | # Easiest way to exit is to close the file descriptor to cause an exit | ||
508 | break | ||
509 | self.reader.close() | ||
505 | 510 | ||
506 | class ConnectionReader(object): | 511 | class ConnectionReader(object): |
507 | 512 | ||