mirror of https://github.com/Icinga/icinga2.git
parent
c5a5d1833b
commit
a2c5887e51
|
@ -223,7 +223,7 @@ void Application::SetResourceLimits(void)
|
||||||
|
|
||||||
if (!new_argv) {
|
if (!new_argv) {
|
||||||
perror("malloc");
|
perror("malloc");
|
||||||
exit(1);
|
Exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
new_argv[0] = argv[0];
|
new_argv[0] = argv[0];
|
||||||
|
@ -242,7 +242,7 @@ void Application::SetResourceLimits(void)
|
||||||
if (execvp(new_argv[0], new_argv) < 0)
|
if (execvp(new_argv[0], new_argv) < 0)
|
||||||
perror("execvp");
|
perror("execvp");
|
||||||
|
|
||||||
exit(1);
|
Exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
# else /* RLIMIT_STACK */
|
# else /* RLIMIT_STACK */
|
||||||
Log(LogNotice, "Application", "System does not support adjusting the resource limit for stack size (RLIMIT_STACK)");
|
Log(LogNotice, "Application", "System does not support adjusting the resource limit for stack size (RLIMIT_STACK)");
|
||||||
|
|
|
@ -190,14 +190,14 @@ static bool Daemonize(void)
|
||||||
|
|
||||||
if (ret == pid) {
|
if (ret == pid) {
|
||||||
Log(LogCritical, "cli", "The daemon could not be started. See log output for details.");
|
Log(LogCritical, "cli", "The daemon could not be started. See log output for details.");
|
||||||
exit(EXIT_FAILURE);
|
Application::Exit(EXIT_FAILURE);
|
||||||
} else if (ret == -1) {
|
} else if (ret == -1) {
|
||||||
Log(LogCritical, "cli")
|
Log(LogCritical, "cli")
|
||||||
<< "waitpid() failed with error code " << errno << ", \"" << Utility::FormatErrorNumber(errno) << "\"";
|
<< "waitpid() failed with error code " << errno << ", \"" << Utility::FormatErrorNumber(errno) << "\"";
|
||||||
exit(EXIT_FAILURE);
|
Application::Exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(0);
|
Application::Exit(0);
|
||||||
}
|
}
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue