Browse Source

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>
Richard Purdie 7 năm trước cách đây
mục cha
commit
e2ca45646e
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      bitbake/lib/prserv/serv.py

+ 5 - 1
bitbake/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):