summaryrefslogtreecommitdiffstats
path: root/bitbake
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
parentb9439e0255e4cf9b7fc8d8b034395bceb4f285f8 (diff)
downloadpoky-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')
-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):
407 except EOFError: 407 except EOFError:
408 # Trap the child exitting/closing the pipe and error out 408 # Trap the child exitting/closing the pipe and error out
409 r = None 409 r = None
410 if not r or r != "ready": 410 if not r or r[0] != "r":
411 ready.close() 411 ready.close()
412 bb.error("Unable to start bitbake server") 412 bb.error("Unable to start bitbake server (%s)" % str(r))
413 if os.path.exists(logfile): 413 if os.path.exists(logfile):
414 logstart_re = re.compile(self.start_log_format % ('([0-9]+)', '([0-9-]+ [0-9:.]+)')) 414 logstart_re = re.compile(self.start_log_format % ('([0-9]+)', '([0-9-]+ [0-9:.]+)'))
415 started = False 415 started = False
@@ -450,7 +450,7 @@ class BitBakeServer(object):
450 os.close(self.readypipe) 450 os.close(self.readypipe)
451 writer = ConnectionWriter(self.readypipein) 451 writer = ConnectionWriter(self.readypipein)
452 self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset) 452 self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset)
453 writer.send("ready") 453 writer.send("r")
454 writer.close() 454 writer.close()
455 server.cooker = self.cooker 455 server.cooker = self.cooker
456 server.server_timeout = self.configuration.server_timeout 456 server.server_timeout = self.configuration.server_timeout