[gnome-continuous-yocto/gnomeostree-3.28-rocko: 7488/8267] bitbake: prserv/serv: Gracefully handle the PR server exiting quickly



commit e2ca45646eed986b9b0a965110b7771cfbc26710
Author: Richard Purdie <richard purdie linuxfoundation org>
Date:   Thu Aug 31 17:23:16 2017 +0100

    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>

 bitbake/lib/prserv/serv.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/bitbake/lib/prserv/serv.py b/bitbake/lib/prserv/serv.py
index dfcbd20..6a99728 100644
--- a/bitbake/lib/prserv/serv.py
+++ b/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):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]