summaryrefslogtreecommitdiff
path: root/daemon/server.c
diff options
context:
space:
mode:
authorGeorge Lebl <jirka@5z.com>2002-08-30 19:11:48 +0000
committerGeorge Lebl <jirka@src.gnome.org>2002-08-30 19:11:48 +0000
commit3a442c894471324aae927fa952422ada7ee19e99 (patch)
tree6fecfc2965944b582b4dd6fc64754a89dcc6d8b9 /daemon/server.c
parent4c8e7b1612e58de90dc833c79a7695df8f790d45 (diff)
downloadgdm-3a442c894471324aae927fa952422ada7ee19e99.tar.gz
Fix test on fork to avoid duplicate slave processes. This makes things
Fri Aug 30 12:20:40 2002 George Lebl <jirka@5z.com> * daemon/slave.c, daemon/server.c: Fix test on fork to avoid duplicate slave processes. This makes things actually work on subsequent logins. Also note a timeout of a message in the syslog if we can.
Diffstat (limited to 'daemon/server.c')
-rw-r--r--daemon/server.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/daemon/server.c b/daemon/server.c
index 5481fe4c..e59db78a 100644
--- a/daemon/server.c
+++ b/daemon/server.c
@@ -133,7 +133,7 @@ gdm_server_reinit (GdmDisplay *disp)
gdm_sigchld_block_push ();
pid = gdm_fork_extra ();
- if (pid < 1) {
+ if (pid < 0) {
/* So much work just because we can't fork */
if (disp->servpid > 1)
kill (disp->servpid, SIGHUP);
@@ -152,6 +152,11 @@ gdm_server_reinit (GdmDisplay *disp)
closelog ();
+ signal (SIGCHLD, SIG_IGN);
+ signal (SIGTERM, SIG_DFL);
+ signal (SIGINT, SIG_DFL);
+ signal (SIGHUP, SIG_DFL);
+
/* close things */
gdm_close_all_descriptors (0 /* from */, -1 /* except */);