summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/server/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/server/main.cpp b/server/server/main.cpp
index 30d6404..baabcd3 100644
--- a/server/server/main.cpp
+++ b/server/server/main.cpp
@@ -1115,6 +1115,7 @@ int main(int argc, char* argv[])
int opt = 0;
int daemon = 0;
std::string cfg_path;
+#ifndef WIN32
while ((opt = getopt(argc, argv, (char*)"bhc:")) != -1) //getting options from command line
{
switch (opt)
@@ -1133,8 +1134,12 @@ int main(int argc, char* argv[])
default:
break;
}
+#else
+ cfg_path = "./config";
+#endif
}
+#ifndef WIN32
if(daemon) //going to background (only for unix-like systems now)
{
pid_t pid;
@@ -1150,6 +1155,7 @@ int main(int argc, char* argv[])
exit(EXIT_SUCCESS);
}
}
+#endif
if (!cfg_path.empty())
cfg = new config(cfg_path.c_str());