diff options
author | George Lebl <jirka@5z.com> | 2001-09-11 08:42:49 +0000 |
---|---|---|
committer | George Lebl <jirka@src.gnome.org> | 2001-09-11 08:42:49 +0000 |
commit | 8040cd1a80eed787c517544e2cc9c3b7b7e9dace (patch) | |
tree | 5268c1e8874cff33b4e5cd220d709d6402050b21 /daemon | |
parent | 7a93c245ef2116e925934ec4508f8c7d7546fad1 (diff) | |
download | gdm-8040cd1a80eed787c517544e2cc9c3b7b7e9dace.tar.gz |
use the safe fork function
Tue Sep 11 01:37:42 2001 George Lebl <jirka@5z.com>
* daemon/errorgui.c: use the safe fork function
* daemon/gdm.c: a doh kind of error, waitpid returns 0 to mean
'no child', not -1 as I assumed.
* gui/gdmflexiserver.c: another doh!, actually whack the screen
portion of the display number
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/errorgui.c | 3 | ||||
-rw-r--r-- | daemon/gdm.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/daemon/errorgui.c b/daemon/errorgui.c index d003f128..a4aeb03f 100644 --- a/daemon/errorgui.c +++ b/daemon/errorgui.c @@ -129,7 +129,8 @@ gdm_error_box (GdmDisplay *d, const char *dialog_type, const char *error) { pid_t pid; - extra_process = pid = fork (); + gdm_safe_fork (&extra_process); + pid = extra_process; if (pid == 0) { char *geom; int i; diff --git a/daemon/gdm.c b/daemon/gdm.c index f5a3f62e..677c9aa3 100644 --- a/daemon/gdm.c +++ b/daemon/gdm.c @@ -862,7 +862,7 @@ gdm_cleanup_children (void) /* Pid and exit status of slave that died */ pid = waitpid (-1, &exitstatus, WNOHANG); - if (pid < 0) + if (pid <= 0) return FALSE; if (WIFEXITED (exitstatus)) { |