Commit a4063b36 authored by Erdal Ronahi's avatar Erdal Ronahi Committed by Brian Cameron

Fix race condition where the d variable wasn't being set until after the

2005-10-27  Erdal Ronahi  <erdal.ronahi@gmail.com>

        * daemon/slave.c: Fix race condition where the d
          variable wasn't being set until after the signal
          handlers, and the signal handlers make use of
          this variable.  Now set it before to ensure it
          is set whenever a signal might be received.
          Issue pointed out by Simon Bowden on
          gdm-list@gnome.org
parent 2bd49fe9
2005-10-27 Erdal Ronahi <erdal.ronahi@gmail.com>
* daemon/slave.c: Fix race condition where the d
variable wasn't being set until after the signal
handlers, and the signal handlers make use of
this variable. Now set it before to ensure it
is set whenever a signal might be received.
Issue pointed out by Simon Bowden on
gdm-list@gnome.org
2005-10-27 Erdal Ronahi <erdal.ronahi@gmail.com>
* configure.ac: Added ku (Kurdish) to ALL_LINGUAS
......
......@@ -88,7 +88,7 @@
#include "cookie.h"
/* Some per slave globals */
static GdmDisplay *d;
static GdmDisplay *d = 0;
static gchar *login = NULL;
static gboolean greet = FALSE;
static gboolean configurator = FALSE;
......@@ -765,6 +765,13 @@ gdm_slave_start (GdmDisplay *display)
#endif /* SIGXFSZ */
sigset_t mask;
/*
* Set d global to display before setting signal handlers,
* since the signal handlers use the d value. Avoids a
* race condition.
*/
d = display;
/* Ignore SIGUSR1/SIGPIPE, and especially ignore it
before the Setjmp */
gdm_signal_ignore (SIGUSR1);
......@@ -1296,8 +1303,6 @@ gdm_slave_run (GdmDisplay *display)
gint openretries = 0;
gint maxtries = 0;
d = display;
gdm_random_tick ();
if (d->sleep_before_run > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment