summaryrefslogtreecommitdiff
path: root/src/daemon.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon.cc')
-rw-r--r--src/daemon.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/daemon.cc b/src/daemon.cc
index 6e46bd5..f5ebe41 100644
--- a/src/daemon.cc
+++ b/src/daemon.cc
@@ -72,7 +72,7 @@ int Daemon::run(const char *user, const char* group)
fprintf(stderr, "Could not find group \"%s\" in /etc/group file.\n", group);
}
- chdir("/");
+ if(chdir("/") == -1) fprintf(stderr, "Could not chdir to '/'.\n");
umask(0);
f = fork();