summaryrefslogtreecommitdiffstats
path: root/xserver.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-08-31 22:36:44 +0000
committerMatt Wilson <msw@redhat.com>1999-08-31 22:36:44 +0000
commita6270457bce863ceddf990b530d31ed66c58364c (patch)
treef4b9cf3ff718e4a568ce81eb8a1be464792aa673 /xserver.py
parentc395ce98398b44173d4b7cf7a1bedb632c0b0e09 (diff)
downloadanaconda-a6270457bce863ceddf990b530d31ed66c58364c.tar.gz
anaconda-a6270457bce863ceddf990b530d31ed66c58364c.tar.xz
anaconda-a6270457bce863ceddf990b530d31ed66c58364c.zip
testing
Diffstat (limited to 'xserver.py')
-rw-r--r--xserver.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/xserver.py b/xserver.py
index 60952311c..cb767fa76 100644
--- a/xserver.py
+++ b/xserver.py
@@ -3,6 +3,7 @@ import string
import kudzu
import isys
import sys
+import time
from xf86config import *
def startX():
@@ -95,12 +96,19 @@ EndSection
print "starting", serverPath
os.execv(serverPath, [serverPath, ':1', '-xf86config',
'/tmp/XF86Config', 'vt7'])
+
+ # give time for the server to fail (if it is going to fail...)
+ time.sleep (1)
+ pid, status = waitpid (server, os.NOHANG)
+ if status:
+ raise RuntimeError, "X server failed to start"
+
child = os.fork()
if (child):
try:
- pid, status = os.waitpid(server, 0)
+ pid, status = os.waitpid(child, 0)
except:
sys.exit (-1)
- sys.exit(status)
+ sys.exit((status >> 8) & 0xf)
return ((mouseProtocol, mouseEmulate, mouseDev), x)