diff options
author | George Lebl <jirka@5z.com> | 2004-02-20 18:07:33 +0000 |
---|---|---|
committer | George Lebl <jirka@src.gnome.org> | 2004-02-20 18:07:33 +0000 |
commit | d861d51e55ea35ee21562a4d2b775ddd0eb98965 (patch) | |
tree | 36655232ed6f8b1abb4c01899d22dd9e3aaae992 /daemon/display.c | |
parent | 20f85d1bd8daf51e72b43573dd1ad32f29c67418 (diff) | |
download | gdm-d861d51e55ea35ee21562a4d2b775ddd0eb98965.tar.gz |
When restarting a server by whacking it and starting it again, wait at
Fri Feb 20 10:03:42 2004 George Lebl <jirka@5z.com>
* display.c, server.[ch], slave.c: When restarting a server by
whacking it and starting it again, wait at least one second to
allow things to "settle". If local display is busy try again once
in 2 secs before resorting to telling the user so. Be much milder
in whacking X's lock files / sockets to avoid whacking actual
locks / sockets when displays are in fact busy and used, that is,
only whack locks / sockets when we in fact successfully started
a server.
Diffstat (limited to 'daemon/display.c')
-rw-r--r-- | daemon/display.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/daemon/display.c b/daemon/display.c index 1327d8da..f7db9d17 100644 --- a/daemon/display.c +++ b/daemon/display.c @@ -153,7 +153,8 @@ gdm_display_check_loop (GdmDisplay *disp) } else { - disp->sleep_before_run = 0; + /* wait one second just for safety (avoids X server races) */ + disp->sleep_before_run = 1; disp->last_start_time = now; } @@ -339,8 +340,8 @@ gdm_display_manage (GdmDisplay *d) d->dispstat = DISPLAY_ALIVE; } - /* reset sleep to 0 */ - d->sleep_before_run = 0; + /* reset sleep to 1, to sleep just in case (avoids X server races) */ + d->sleep_before_run = 1; return TRUE; } |