summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-29 16:51:39 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-05 13:11:27 +0000
commit5610acda80605aa9c5b0243c872dd1a47bf4b501 (patch)
tree41055c290c2d1c4514c7902d5a82ccae8886a9ab /bitbake/lib/bb/server
parentb9439e0255e4cf9b7fc8d8b034395bceb4f285f8 (diff)
downloadopenembedded-core-contrib-5610acda80605aa9c5b0243c872dd1a47bf4b501.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: 767c9596d129d21ddf5d2e00c55f0a0525c641dc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/server')
-rw-r--r--bitbake/lib/bb/server/process.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index d56681c5a9..fd1ba47fd5 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -407,9 +407,9 @@ class BitBakeServer(object):
except EOFError:
# Trap the child exitting/closing the pipe and error out
r = None
- if not r or r != "ready":
+ if not r or r[0] != "r":
ready.close()
- bb.error("Unable to start bitbake server")
+ bb.error("Unable to start bitbake server (%s)" % str(r))
if os.path.exists(logfile):
logstart_re = re.compile(self.start_log_format % ('([0-9]+)', '([0-9-]+ [0-9:.]+)'))
started = False
@@ -450,7 +450,7 @@ class BitBakeServer(object):
os.close(self.readypipe)
writer = ConnectionWriter(self.readypipein)
self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
- writer.send("ready")
+ writer.send("r")
writer.close()
server.cooker = self.cooker
server.server_timeout = self.configuration.server_timeout