summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorGeorge Lebl <jirka@5z.com>2001-09-07 03:21:27 +0000
committerGeorge Lebl <jirka@src.gnome.org>2001-09-07 03:21:27 +0000
commit2aceb7aeb2f69b8f003c3797186c0958af5d73b1 (patch)
tree704bae5b72a55ac802d4780aef8521ece16e7958 /daemon
parent20ad65705ab2ced25169ddeb2775008e04b2e115 (diff)
downloadgdm-2aceb7aeb2f69b8f003c3797186c0958af5d73b1.tar.gz
handle error from fork when daemonizing well
Thu Sep 06 20:17:31 2001 George Lebl <jirka@5z.com> * daemon/gdm.c: handle error from fork when daemonizing well
Diffstat (limited to 'daemon')
-rw-r--r--daemon/gdm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/daemon/gdm.c b/daemon/gdm.c
index 1ce5aa3d..997aa19f 100644
--- a/daemon/gdm.c
+++ b/daemon/gdm.c
@@ -566,7 +566,8 @@ gdm_daemonify (void)
FILE *pf;
pid_t pid;
- if ((pid = fork ())) {
+ pid = fork ();
+ if (pid > 0) {
if ((pf = fopen (GdmPidFile, "w"))) {
fprintf (pf, "%d\n", pid);