summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rwxr-xr-xanaconda8
-rw-r--r--mini-wm.c5
3 files changed, 21 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c59265e4b..7458a854e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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).
+
2004-10-29 Jeremy Katz <katzj@redhat.com>
* loader2/net.c (getWirelessConfig): Allow 128-bit WEP keys (#137447)
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
diff --git a/mini-wm.c b/mini-wm.c
index 7a1ec03f3..e2bbe9d4b 100644
--- a/mini-wm.c
+++ b/mini-wm.c
@@ -16,6 +16,7 @@
#include <stdio.h>
+#include <unistd.h>
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
@@ -104,6 +105,10 @@ int main( int argc,
mini_wm_start ();
+ /* Indicate back to anaconda that we now have established
+ * connection to the display. */
+ write(1, "#", 1);
+
gtk_main();
return(0);