bitbake: prserv/serv: Gracefully handle the PR server exiting quickly

If the server exits quickly its PID may no longer exist. Handle
this gracefully.

(Bitbake rev: c1b00a9265fa4146b8db8b7d03a51bf2bfcf9f51)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2017-08-31 17:23:16 +01:00
parent 6e1ab28e94
commit e2ca45646e

View File

@@ -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):