118 lines
2.8 KiB
Diff
118 lines
2.8 KiB
Diff
--- daemon/slave.c 2007-09-12 18:59:56.000000000 +0200
|
|
+++ daemon/slave.c 2007-09-15 01:04:02.000000000 +0200
|
|
@@ -192,7 +192,7 @@
|
|
* the slave can talk to itself from its sig handler
|
|
* using the greeter ipc mechanism
|
|
*/
|
|
-static int slave_fd_out = -1;
|
|
+//static int slave_fd_out = -1;
|
|
|
|
#ifdef HAVE_TSOL
|
|
static gboolean have_suntsol_extension = FALSE;
|
|
@@ -682,6 +682,18 @@
|
|
}
|
|
|
|
static void
|
|
+whack_greeter_fds (void)
|
|
+{
|
|
+ if (greeter_fd_out > 0)
|
|
+ VE_IGNORE_EINTR (close (greeter_fd_out));
|
|
+ greeter_fd_out = -1;
|
|
+ if (greeter_fd_in > 0)
|
|
+ VE_IGNORE_EINTR (close (greeter_fd_in));
|
|
+ greeter_fd_in = -1;
|
|
+}
|
|
+
|
|
+/*
|
|
+static void
|
|
whack_greeter_and_slave_fds (void)
|
|
{
|
|
if (greeter_fd_out > 0)
|
|
@@ -690,10 +702,12 @@
|
|
if (greeter_fd_in > 0)
|
|
VE_IGNORE_EINTR (close (greeter_fd_in));
|
|
greeter_fd_in = -1;
|
|
+
|
|
if (slave_fd_out > 0)
|
|
VE_IGNORE_EINTR (close (slave_fd_out));
|
|
slave_fd_out = -1;
|
|
}
|
|
+*/
|
|
|
|
static void
|
|
term_session_stop_and_quit (void)
|
|
@@ -1178,7 +1192,8 @@
|
|
|
|
d->greetpid = 0;
|
|
|
|
- whack_greeter_and_slave_fds ();
|
|
+ //whack_greeter_and_slave_fds ();
|
|
+ whack_greeter_fds ();
|
|
|
|
gdm_slave_send_num (GDM_SOP_GREETPID, 0);
|
|
|
|
@@ -2027,7 +2042,8 @@
|
|
|
|
d->greetpid = 0;
|
|
|
|
- whack_greeter_and_slave_fds ();
|
|
+ //whack_greeter_and_slave_fds ();
|
|
+ whack_greeter_fds ();
|
|
|
|
gdm_slave_send_num (GDM_SOP_GREETPID, 0);
|
|
}
|
|
@@ -2945,10 +2961,13 @@
|
|
|
|
default:
|
|
VE_IGNORE_EINTR (close (pipe1[0]));
|
|
+ // added
|
|
+ VE_IGNORE_EINTR (close (pipe2[1]));
|
|
|
|
- whack_greeter_and_slave_fds ();
|
|
+ //whack_greeter_and_slave_fds ();
|
|
+ whack_greeter_fds ();
|
|
|
|
- slave_fd_out = pipe2[1];
|
|
+ //slave_fd_out = pipe2[1];
|
|
|
|
greeter_fd_out = pipe1[1];
|
|
greeter_fd_in = pipe2[0];
|
|
@@ -5301,7 +5320,8 @@
|
|
|
|
greet = FALSE;
|
|
d->greetpid = 0;
|
|
- whack_greeter_and_slave_fds ();
|
|
+ //whack_greeter_and_slave_fds ();
|
|
+ whack_greeter_fds ();
|
|
gdm_slave_send_num (GDM_SOP_GREETPID, 0);
|
|
|
|
do_restart_greeter = TRUE;
|
|
@@ -5313,7 +5333,8 @@
|
|
continue;
|
|
}
|
|
|
|
- whack_greeter_and_slave_fds ();
|
|
+ //whack_greeter_and_slave_fds ();
|
|
+ whack_greeter_fds ();
|
|
|
|
/* if greet is TRUE, then the greeter died outside of our
|
|
* control really, so clean up and die, something is wrong
|
|
@@ -5456,7 +5477,7 @@
|
|
gdm_wait_for_go = FALSE;
|
|
} else if (strcmp (&s[1], GDM_NOTIFY_TWIDDLE_POINTER) == 0) {
|
|
gdm_twiddle_pointer (d);
|
|
- } else if (strcmp (&s[1], GDM_NOTIFY_RESET) == 0) {
|
|
+ } /*else if (strcmp (&s[1], GDM_NOTIFY_RESET) == 0) {
|
|
if (!d->logged_in) {
|
|
gdm_fdprintf (slave_fd_out, "%c%c%c\n",
|
|
STX, BEL, GDM_INTERRUPT_CANCEL);
|
|
@@ -5466,7 +5487,7 @@
|
|
gdm_fdprintf (slave_fd_out, "%c%c%c\n",
|
|
STX, BEL, GDM_INTERRUPT_TOKEN_LOGIN);
|
|
}
|
|
- }
|
|
+ }*/
|
|
} else if (s[0] == GDM_SLAVE_NOTIFY_RESPONSE) {
|
|
gdm_got_ack = TRUE;
|
|
if (gdm_ack_response)
|