diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-08 20:55:21 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-13 09:28:14 +0100 |
commit | 801b0d29d435abe55df43da5036b4c8ff7bd59a6 (patch) | |
tree | 2e7affff1d1ac7a9313f01ff33571dc93254a6f3 /bitbake/lib/bb/server | |
parent | ea9fff4bd030266290e7f7aeef83603a02d35ae1 (diff) | |
download | poky-801b0d29d435abe55df43da5036b4c8ff7bd59a6.tar.gz |
bitbake: server/process: Ensure we don't loop on client EOFError
The server currently crashes if we hit an EOFError due to controllersock
still being in ready and the continue meaning ready isn't re-evaluated.
Setting the value to False can mean the shutdown code doesn't handle the
situation cleanly.
Clear ready to avoid the crash/loop instead and handle any OSError whilst
we're in here.
(Bitbake rev: 2bc47e887c3b41417edaa89a8708c223fd2085de)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/server')
-rw-r--r-- | bitbake/lib/bb/server/process.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index 338c44835e..ee8b14ea7d 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py | |||
@@ -164,7 +164,7 @@ class ProcessServer(multiprocessing.Process): | |||
164 | 164 | ||
165 | self.haveui = True | 165 | self.haveui = True |
166 | 166 | ||
167 | except EOFError: | 167 | except (EOFError, OSError): |
168 | print("Disconnecting Client") | 168 | print("Disconnecting Client") |
169 | fds.remove(self.controllersock) | 169 | fds.remove(self.controllersock) |
170 | fds.remove(self.command_channel) | 170 | fds.remove(self.command_channel) |
@@ -190,7 +190,7 @@ class ProcessServer(multiprocessing.Process): | |||
190 | command = self.command_channel.get() | 190 | command = self.command_channel.get() |
191 | except EOFError: | 191 | except EOFError: |
192 | # Client connection shutting down | 192 | # Client connection shutting down |
193 | self.command_channel = False | 193 | ready = [] |
194 | continue | 194 | continue |
195 | if command[0] == "terminateServer": | 195 | if command[0] == "terminateServer": |
196 | self.quit = True | 196 | self.quit = True |