diff --git a/icinga-app/icinga.cpp b/icinga-app/icinga.cpp index 0e16bee91..6efdc1573 100644 --- a/icinga-app/icinga.cpp +++ b/icinga-app/icinga.cpp @@ -611,9 +611,6 @@ VOID WINAPI ServiceMain(DWORD argc, LPSTR *argv) */ int main(int argc, char **argv) { - /* must be called before using any other libbase functions */ - Application::InitializeBase(); - #ifndef _WIN32 rlimit rl; if (getrlimit(RLIMIT_NOFILE, &rl) >= 0) { @@ -633,6 +630,9 @@ int main(int argc, char **argv) } #endif /* _WIN32 */ + /* must be called before using any other libbase functions */ + Application::InitializeBase(); + /* Set command-line arguments. */ Application::SetArgC(argc); Application::SetArgV(argv);