diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-29 16:51:39 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-01-28 17:03:13 +0000 |
commit | 6399d307ad493eee4d3d99ac815823557e2f1111 (patch) | |
tree | 83cf3f29d56cf699d7356fc67b5d0303c1aaff90 /bitbake/lib/bb/server | |
parent | 4e3ab56b9f9f7cb9fb63f99938dd6eed1793c0ff (diff) | |
download | poky-6399d307ad493eee4d3d99ac815823557e2f1111.tar.gz |
bitbake: server/process: Handle short reads
Its possible the read may return a smaller number of characters. Remove
the possibility by using a single character to signal the server is ready.
(Bitbake rev: 7fb2d6bed06439e59a81dd91798d886ee0a72e99)
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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index 986e9efc79..eb794e0dd4 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py | |||
@@ -410,9 +410,9 @@ class BitBakeServer(object): | |||
410 | except EOFError: | 410 | except EOFError: |
411 | # Trap the child exitting/closing the pipe and error out | 411 | # Trap the child exitting/closing the pipe and error out |
412 | r = None | 412 | r = None |
413 | if not r or r != "ready": | 413 | if not r or r[0] != "r": |
414 | ready.close() | 414 | ready.close() |
415 | bb.error("Unable to start bitbake server") | 415 | bb.error("Unable to start bitbake server (%s)" % str(r)) |
416 | if os.path.exists(logfile): | 416 | if os.path.exists(logfile): |
417 | logstart_re = re.compile(self.start_log_format % ('([0-9]+)', '([0-9-]+ [0-9:.]+)')) | 417 | logstart_re = re.compile(self.start_log_format % ('([0-9]+)', '([0-9-]+ [0-9:.]+)')) |
418 | started = False | 418 | started = False |
@@ -455,7 +455,7 @@ class BitBakeServer(object): | |||
455 | os.close(self.readypipe) | 455 | os.close(self.readypipe) |
456 | writer = ConnectionWriter(self.readypipein) | 456 | writer = ConnectionWriter(self.readypipein) |
457 | self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset) | 457 | self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset) |
458 | writer.send("ready") | 458 | writer.send("r") |
459 | writer.close() | 459 | writer.close() |
460 | server.cooker = self.cooker | 460 | server.cooker = self.cooker |
461 | server.server_timeout = self.configuration.server_timeout | 461 | server.server_timeout = self.configuration.server_timeout |