Let mongoose binary change CWD to document_root

This commit is contained in:
Sergey Lyubka committed 2014-01-03 21:45:13 +00:00
1 parent dfdfcc060d
commit 675b83a3ef
2 files changed
+4 -1

No files matched your search

+4
View File
@@ -449,6 +449,10 @@ static void start_mongoose(int argc, char *argv[]) {
free(options[i + 1]);
}
// Change current working directory to document root. This way,
// scripts can use relative paths.
chdir(mg_get_option(server, "document_root"));
// Add an ability to pass listening socket to mongoose
{
const char *env = getenv("MONGOOSE_LISTENING_SOCKET");