summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMukund Sivaraman <muks@banu.com>2009-09-23 07:08:45 +0530
committerMukund Sivaraman <muks@banu.com>2009-09-27 08:09:22 +0530
commitd102ed4ed39d39cf3777825f795ee95e41407d71 (patch)
tree583ebc45d98f8a42bc0071b8d6229e74f7a63bff /src
parent50c781d0c9dd991b2af14e41ccfaafbb04be48d7 (diff)
downloadtinyproxy-d102ed4ed39d39cf3777825f795ee95e41407d71.tar.gz
tinyproxy-d102ed4ed39d39cf3777825f795ee95e41407d71.zip
Don't ignore retval of chdir()
Diffstat (limited to 'src')
-rw-r--r--src/daemon.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/daemon.c b/src/daemon.c
index 9a87d7a..e865ecf 100644
--- a/src/daemon.c
+++ b/src/daemon.c
@@ -24,6 +24,7 @@
#include "main.h"
#include "daemon.h"
+#include "log.h"
/*
* Fork a child process and then kill the parent so make the calling
@@ -40,7 +41,11 @@ void makedaemon (void)
if (fork () != 0)
exit (0);
- chdir ("/");
+ if (chdir ("/") != 0) {
+ log_message (LOG_WARNING,
+ "Could not change directory to /");
+ }
+
umask (0177);
#if NDEBUG