summaryrefslogtreecommitdiff
path: root/server/src/daemon.cc
diff options
context:
space:
mode:
authordeva <deva>2008-05-20 14:03:10 +0000
committerdeva <deva>2008-05-20 14:03:10 +0000
commit556f00e4af55e78836c45f47b0662ab44bbb8b48 (patch)
treea5c315b35d400a397a35a86b86fe656d3a829af9 /server/src/daemon.cc
parent91d56787bec83a3a7c2ad6afd84d2b82c5d869b9 (diff)
Made fixes pointed out by GCC 4.2 and -D_FORTIFY_SOURCES=2
Diffstat (limited to 'server/src/daemon.cc')
-rw-r--r--server/src/daemon.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/src/daemon.cc b/server/src/daemon.cc
index a88fa39..655a234 100644
--- a/server/src/daemon.cc
+++ b/server/src/daemon.cc
@@ -81,7 +81,7 @@ Daemon::~Daemon()
int Daemon::run(const char *user, const char* group, bool detach)
{
- int f;
+ // int f;
int fd;
// Fetch user and group IDs
@@ -103,7 +103,9 @@ int Daemon::run(const char *user, const char* group, bool detach)
}
}
- chdir("/");
+ if(chdir("/")) {
+ fprintf(stderr, "Could not chdir to / : %s\n", strerror(errno));
+ }
umask(0);
if(detach) {