diff options
author | George Lebl <jirka@5z.com> | 2002-08-28 01:26:24 +0000 |
---|---|---|
committer | George Lebl <jirka@src.gnome.org> | 2002-08-28 01:26:24 +0000 |
commit | d68d282f6c78371d139b410ddf582185d3e42329 (patch) | |
tree | ce14fdacc1893ab14c9052f09350ac3987253385 /daemon/server.c | |
parent | 8afea6665b6a664373f55f396c3d263c0de2b2ca (diff) | |
download | gdm-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
Diffstat (limited to 'daemon/server.c')
-rw-r--r-- | daemon/server.c | 11 |
1 files changed, 6 insertions, 5 deletions
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); } |