summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--daemon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/daemon.c b/daemon.c
index 88d1ed9..dcc5669 100644
--- a/daemon.c
+++ b/daemon.c
@@ -46,7 +46,8 @@ int daemon_start(int ignsigcld)
out:
/* Move the current directory to root, to make sure we aren't on a */
/* mounted filesystem. */
- chdir("/");
+ if (chdir("/") < 0)
+ return 0;
/* Clear any inherited file mode creation mask. */
umask(0);