With dbus 1.0.x we were patching the dbus-launch.c file using "#ifndef __sun" 
to comment out a vital
select() call where the while(TRUE) loop was intended to pause waiting for an 
event to happen.

The fix was to only only comment out the calls to FD_SET for the tty_fd and 
leave the x_fd inplace,
leaving dbus-launch to wait for an X event to occur.

Darren.

PS - The diff below is for this specific change, the patch to be committed will 
include other
changes not specific to this fix.

--------------

--- SUNWdbus-1.0.2/dbus-1.0.2/tools/dbus-launch.c~      Tue Dec 12 11:30:26 2006
+++ SUNWdbus-1.0.2/dbus-1.0.2/tools/dbus-launch.c       Fri Dec 15 11:53:50 2006
@@ -419,36 +419,36 @@
 #ifndef __sun
 /*
  * read() sometimes returns 0 on Solaris in valid conditions, so this
  * test causes dbus-launch to fail to start gnome-session
  */
       if (tty_fd >= 0)
         {
           FD_SET (tty_fd, &read_set);
           FD_SET (tty_fd, &err_set);
         }
+#endif

       if (x_fd >= 0)
         {
           FD_SET (x_fd, &read_set);
           FD_SET (x_fd, &err_set);
         }

       select (MAX (tty_fd, x_fd) + 1,
               &read_set, NULL, &err_set, NULL);

       if (got_sighup)
         {
           verbose ("Got SIGHUP, exiting\n");
           kill_bus_and_exit (0);
         }
-#endif

 #ifdef DBUS_BUILD_X11
       /* Dump events on the floor, and let
        * IO error handler run if we lose
        * the X connection
        */
       if (x_fd >= 0)
         verbose ("X fd condition reading = %d error = %d\n",
                  FD_ISSET (x_fd, &read_set),
                  FD_ISSET (x_fd, &err_set));

Reply via email to