1 diff -u dbus-1.0.2/tools/dbus-launch.c-orig dbus-1.0.2/tools/dbus-launch.c 2 --- dbus-1.0.2/tools/dbus-launch.c-orig Mon Dec 11 19:21:25 2006 3 +++ dbus-1.0.2/tools/dbus-launch.c Fri Dec 15 11:44:06 2006 4 @@ -392,6 +392,9 @@ 5 x_fd = -1; 6 #endif 7 8 +#ifdef __sun 9 + tty_fd = -1; 10 +#else 11 if (isatty (0)) 12 tty_fd = 0; 13 else 14 @@ -401,6 +404,7 @@ 15 verbose ("stdin isatty(), monitoring it\n"); 16 else 17 verbose ("stdin was not a TTY, not monitoring it\n"); 18 +#endif 19 20 if (tty_fd < 0 && x_fd < 0) 21 { 22 @@ -412,12 +416,17 @@ 23 { 24 FD_ZERO (&read_set); 25 FD_ZERO (&err_set); 26 - 27 +#ifndef __sun 28 +/* 29 + * read() sometimes returns 0 on Solaris in valid conditions, so this 30 + * test causes dbus-launch to fail to start gnome-session 31 + */ 32 if (tty_fd >= 0) 33 { 34 FD_SET (tty_fd, &read_set); 35 FD_SET (tty_fd, &err_set); 36 } 37 +#endif 38 39 if (x_fd >= 0) 40 { 41 42