diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rwxr-xr-x | anaconda | 8 | ||||
-rw-r--r-- | mini-wm.c | 5 |
3 files changed, 21 insertions, 0 deletions
@@ -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) @@ -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 @@ -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); |