mirror of https://github.com/Icinga/icinga2.git
parent
51329f0b3c
commit
fd233ae901
|
@ -595,7 +595,7 @@ int Main(void)
|
|||
int rc = Application::GetInstance()->Run();
|
||||
|
||||
#ifndef _DEBUG
|
||||
_exit(rc); // Yay, our static destructors are pretty much beyond repair at this point.
|
||||
Application::Exit(rc);
|
||||
#endif /* _DEBUG */
|
||||
|
||||
return rc;
|
||||
|
@ -788,11 +788,11 @@ int main(int argc, char **argv)
|
|||
};
|
||||
|
||||
StartServiceCtrlDispatcher(dispatchTable);
|
||||
_exit(1);
|
||||
Application::Exit(1);
|
||||
}
|
||||
#endif /* _WIN32 */
|
||||
|
||||
int rc = Main();
|
||||
|
||||
_exit(rc);
|
||||
Application::Exit(rc);
|
||||
}
|
||||
|
|
|
@ -112,9 +112,9 @@ Application::~Application(void)
|
|||
m_Instance = NULL;
|
||||
}
|
||||
|
||||
void Application::Exit(int code)
|
||||
void Application::Exit(int rc)
|
||||
{
|
||||
_exit(code);
|
||||
_exit(rc); // Yay, our static destructors are pretty much beyond repair at this point.
|
||||
}
|
||||
|
||||
void Application::InitializeBase(void)
|
||||
|
@ -711,7 +711,7 @@ void Application::UpdatePidFile(const String& filename, pid_t pid)
|
|||
if (fcntl(fd, F_SETLK, &lock) < 0) {
|
||||
Log(LogCritical, "Application", "Could not lock PID file. Make sure that only one instance of the application is running.");
|
||||
|
||||
_exit(EXIT_FAILURE);
|
||||
Application::Exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (ftruncate(fd, 0) < 0) {
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
|
||||
static Application::Ptr GetInstance(void);
|
||||
|
||||
static void Exit(int code);
|
||||
static void Exit(int rc);
|
||||
|
||||
int Run(void);
|
||||
|
||||
|
|
Loading…
Reference in New Issue