summaryrefslogtreecommitdiffstats
path: root/anaconda
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2004-10-29 14:44:40 +0000
committerJeremy Katz <katzj@redhat.com>2004-10-29 14:44:40 +0000
commit8f8d6d7b94f66b68643140ad5002761e697e7c9d (patch)
treeb2edd41c2a78491e9eb223d9db7cbdac2e869b19 /anaconda
parent7fbf5ebd7ee55cf2b1f807a5912839ec1ff0c659 (diff)
downloadanaconda-8f8d6d7b94f66b68643140ad5002761e697e7c9d.tar.gz
anaconda-8f8d6d7b94f66b68643140ad5002761e697e7c9d.tar.xz
anaconda-8f8d6d7b94f66b68643140ad5002761e697e7c9d.zip
2004-10-29 Kristian Høgsberg <krh@redhat.com>
* mini-wm.c (main): Write acknowledge token back to anaconda to indicate successful connection to the X server. * anaconda (startMiniWM): Wait for token before launching other X clients (#108777).
Diffstat (limited to 'anaconda')
-rwxr-xr-xanaconda8
1 files changed, 8 insertions, 0 deletions
diff --git a/anaconda b/anaconda
index 0494b65a1..bb8e14b3b 100755
--- a/anaconda
+++ b/anaconda
@@ -40,6 +40,7 @@ def dup_log(format, *args):
# start miniWM
def startMiniWM(root='/'):
+ (rd, wr) = os.pipe()
childpid = os.fork()
if not childpid:
if os.access("./mini-wm", os.X_OK):
@@ -49,9 +50,16 @@ def startMiniWM(root='/'):
else:
return None
+ os.dup2(wr, 1)
+ os.close(wr)
args = [cmd, '--display', ':1']
os.execv(args[0], args)
sys.exit (1)
+ else:
+ # We need to make sure that mini-wm is the first client to
+ # connect to the X server (see bug #108777). Wait for mini-wm
+ # to write back an acknowledge token.
+ os.read(rd, 1)
return childpid