summaryrefslogtreecommitdiffstats
path: root/xserver.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2002-08-06 05:16:45 +0000
committerMike Fulbright <msf@redhat.com>2002-08-06 05:16:45 +0000
commit20e1a836743a96493d66e427b1e18d79749553b5 (patch)
tree18614ec93fb2dc1b671fdf64e8a36bd09114689b /xserver.py
parent09a5016c0511fb731a39e71d52a500d15590fb60 (diff)
downloadanaconda-20e1a836743a96493d66e427b1e18d79749553b5.tar.gz
anaconda-20e1a836743a96493d66e427b1e18d79749553b5.tar.xz
anaconda-20e1a836743a96493d66e427b1e18d79749553b5.zip
move starting miniwm to xserver.py
Diffstat (limited to 'xserver.py')
-rw-r--r--xserver.py26
1 files changed, 23 insertions, 3 deletions
diff --git a/xserver.py b/xserver.py
index 867e751d7..08f36513c 100644
--- a/xserver.py
+++ b/xserver.py
@@ -22,6 +22,8 @@ import sys
import time
from xf86config import *
+from flags import flags
+
from snack import *
from constants_text import *
from mouse_text import MouseWindow, MouseDeviceWindow
@@ -82,11 +84,11 @@ def mouseWindow(mouse):
def startMiniWM(root='/'):
childpid = os.fork()
if not childpid:
- args = [root+'/'+'/usr/bin/mini-wm', '--display', ':1']
+ args = [root + '/usr/bin/mini-wm', '--display', ':1']
os.execv(args[0], args)
sys.exit (1)
- return
+ return childpid
# start X server for install process ONLY
@@ -212,7 +214,16 @@ def testx(x):
count = count + 1
print _(" X server started successfully.")
-
+
+ # now start up mini-wm
+ if not flags.test:
+ try:
+ miniwm_pid = startMiniWM()
+ log("Started mini-wm")
+ except:
+ miniwm_pid = None
+ log("Unable to start mini-wm")
+
child = os.fork()
if (child):
# here we fork and wait on our child, which will contine
@@ -226,6 +237,15 @@ def testx(x):
print __name__, "waitpid:", msg
sys.exit (-1)
+ # kill miniwm first
+ if miniwm_pid is not None:
+ try:
+ os.kill(miniwm_pid, 15)
+ os.waitpid(miniwm_pid, 0)
+ except:
+ pass
+
+ # now the X server
try:
os.kill(server, 15)
os.waitpid(server, 0)