diff options
author | Matt Wilson <msw@redhat.com> | 2001-01-18 01:08:17 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2001-01-18 01:08:17 +0000 |
commit | de45a4f6f39af8a413d7abb18b5b5cd6ca5c8b14 (patch) | |
tree | e3bff9046f84c80a930831dda8c51c6f2f599343 /xserver.py | |
parent | 23cad1f520025cefb99555bd66d85883ed0d50db (diff) | |
download | anaconda-de45a4f6f39af8a413d7abb18b5b5cd6ca5c8b14.tar.gz anaconda-de45a4f6f39af8a413d7abb18b5b5cd6ca5c8b14.tar.xz anaconda-de45a4f6f39af8a413d7abb18b5b5cd6ca5c8b14.zip |
don't fail on waitpid failures
Diffstat (limited to 'xserver.py')
-rw-r--r-- | xserver.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/xserver.py b/xserver.py index 212dde58e..403642b6d 100644 --- a/xserver.py +++ b/xserver.py @@ -173,7 +173,11 @@ def testx(mouse, x): while count < 60: sys.stdout.write(".") sys.stdout.flush() - pid, status = os.waitpid (server, os.WNOHANG) + pid = 0 + try: + pid, status = os.waitpid (server, os.WNOHANG) + except OSError (errno, msg): + print __name__, "waitpid:", msg if pid: sys.stderr.write("X SERVER FAILED"); raise RuntimeError, "X server failed to start" @@ -192,7 +196,8 @@ def testx(mouse, x): if (child): try: pid, status = os.waitpid(child, 0) - except: + except OSError (errno, msg): + print __name__, "waitpid:", msg sys.exit (-1) try: @@ -240,7 +245,12 @@ def start_existing_X(): # otherwise with NFS installs the X server may be still being # fetched from the network while we already continue to run time.sleep (4) - pid, status = os.waitpid (server, os.WNOHANG) + status = 0 + try: + pid, status = os.waitpid (server, os.WNOHANG) + except OSError (errno, msg): + print __name__, "waitpid:", msg + if status: raise RuntimeError, "X server failed to start" |