summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Lebl <jirka@5z.com>2002-08-28 01:26:24 +0000
committerGeorge Lebl <jirka@src.gnome.org>2002-08-28 01:26:24 +0000
commitd68d282f6c78371d139b410ddf582185d3e42329 (patch)
treece14fdacc1893ab14c9052f09350ac3987253385
parent8afea6665b6a664373f55f396c3d263c0de2b2ca (diff)
downloadgdm-d68d282f6c78371d139b410ddf582185d3e42329.tar.gz
tiny bit of cleanup
Tue Aug 27 18:35:16 2002 George Lebl <jirka@5z.com> * daemon/server.c: tiny bit of cleanup
-rw-r--r--ChangeLog4
-rw-r--r--daemon/server.c11
2 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 9dc67b68..c8f9d0c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Aug 27 18:35:16 2002 George Lebl <jirka@5z.com>
+
+ * daemon/server.c: tiny bit of cleanup
+
Tue Aug 27 18:14:20 2002 George Lebl <jirka@5z.com>
* daemon/slave.c: when we get the term signal do cleanup but no
diff --git a/daemon/server.c b/daemon/server.c
index c61cd734..5481fe4c 100644
--- a/daemon/server.c
+++ b/daemon/server.c
@@ -135,7 +135,7 @@ gdm_server_reinit (GdmDisplay *disp)
pid = gdm_fork_extra ();
if (pid < 1) {
/* So much work just because we can't fork */
- if (disp->servpid > 0)
+ if (disp->servpid > 1)
kill (disp->servpid, SIGHUP);
gdm_sigchld_block_push ();
@@ -166,7 +166,7 @@ gdm_server_reinit (GdmDisplay *disp)
dsp = XOpenDisplay (d->name);
/* Now whack the server with a SIGHUP */
- if (disp->servpid > 0)
+ if (disp->servpid > 1)
kill (disp->servpid, SIGHUP);
if (dsp == NULL) {
@@ -227,7 +227,7 @@ gdm_server_stop (GdmDisplay *disp)
servpid = disp->servpid;
disp->servpid = 0;
- if (servpid > 0 &&
+ if (servpid > 1 &&
kill (servpid, SIGTERM) == 0)
ve_waitpid_no_signal (servpid, 0, 0);
gdm_sigchld_block_pop ();
@@ -652,7 +652,7 @@ gdm_server_start (GdmDisplay *disp, gboolean treat_as_flexi,
gdm_sigchld_block_push ();
pid = d->servpid;
d->servpid = 0;
- if (pid > 0 &&
+ if (pid > 1 &&
kill (pid, SIGTERM) == 0)
ve_waitpid_no_signal (pid, NULL, 0);
gdm_sigchld_block_pop ();
@@ -878,7 +878,8 @@ gdm_server_spawn (GdmDisplay *d, const char *vtarg)
if (d->servpid > 0) {
pid_t pid = d->servpid;
d->servpid = 0;
- if (kill (pid, SIGTERM) == 0)
+ if (pid > 1 &&
+ kill (pid, SIGTERM) == 0)
ve_waitpid_no_signal (pid, NULL, 0);
}