summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-31 17:23:16 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-31 17:36:53 +0100
commitc1b00a9265fa4146b8db8b7d03a51bf2bfcf9f51 (patch)
tree5b103935426b7c1f606decd6c51f5c0e4515d989
parentba7e3c73d8f4d2bd1d7434b97c326e7ab935231a (diff)
downloadbitbake-contrib-c1b00a9265fa4146b8db8b7d03a51bf2bfcf9f51.tar.gz
bitbake-contrib-c1b00a9265fa4146b8db8b7d03a51bf2bfcf9f51.tar.bz2
bitbake-contrib-c1b00a9265fa4146b8db8b7d03a51bf2bfcf9f51.zip
prserv/serv: Gracefully handle the PR server exiting quickly
If the server exits quickly its PID may no longer exist. Handle this gracefully. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/prserv/serv.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/prserv/serv.py b/lib/prserv/serv.py
index dfcbd2058f..6a99728c4f 100644
--- a/lib/prserv/serv.py
+++ b/lib/prserv/serv.py
@@ -492,7 +492,11 @@ def auto_shutdown():
PRServerConnection(host, port).terminate()
except:
logger.critical("Stop PRService %s:%d failed" % (host,port))
- os.waitpid(singleton.prserv.pid, 0)
+
+ try:
+ os.waitpid(singleton.prserv.pid, 0)
+ except ChildProcessError:
+ pass
singleton = None
def ping(host, port):