summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networking/httpd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/networking/httpd.c b/networking/httpd.c
index 1757e09..c2d2265 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -2737,7 +2737,12 @@ int httpd_main(int argc UNUSED_PARAM, char **argv)
}
#endif
- xchdir(home_httpd);
+ /* Chdir to home (unless we were re-execed for NOMMU case:
+ * we are already in the home dir then).
+ */
+ if (!re_execed)
+ xchdir(home_httpd);
+
if (!(opt & OPT_INETD)) {
signal(SIGCHLD, SIG_IGN);
server_socket = openServer();