aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--daemon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/daemon.c b/daemon.c
index 220d0d0c..a0b709d3 100644
--- a/daemon.c
+++ b/daemon.c
@@ -252,8 +252,10 @@ nottyDetach:
return(PS_IOERR);
}
+#ifdef HAVE_GETCWD
/* move to root directory, so we don't prevent filesystem unmounts */
chdir("/");
+#endif
/* set our umask to something reasonable (we hope) */
#if defined(DEF_UMASK)