mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-31 01:24:19 +02:00
parent
3a12ba75c7
commit
bf959371c4
@ -256,9 +256,9 @@ void Application::SetResourceLimits(void)
|
|||||||
else
|
else
|
||||||
rl.rlim_cur = rl.rlim_max;
|
rl.rlim_cur = rl.rlim_max;
|
||||||
|
|
||||||
if (setrlimit(RLIMIT_STACK, &rl) < 0)
|
if (setrlimit(RLIMIT_STACK, &rl) < 0) {
|
||||||
Log(LogNotice, "Application", "Could not adjust resource limit for stack size (RLIMIT_STACK)");
|
Log(LogNotice, "Application", "Could not adjust resource limit for stack size (RLIMIT_STACK)");
|
||||||
else if (set_stack_rlimit) {
|
if (set_stack_rlimit) {
|
||||||
char **new_argv = static_cast<char **>(malloc(sizeof(char *) * (argc + 2)));
|
char **new_argv = static_cast<char **>(malloc(sizeof(char *) * (argc + 2)));
|
||||||
|
|
||||||
if (!new_argv) {
|
if (!new_argv) {
|
||||||
@ -283,6 +283,7 @@ void Application::SetResourceLimits(void)
|
|||||||
perror("execvp");
|
perror("execvp");
|
||||||
_exit(EXIT_FAILURE);
|
_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)");
|
||||||
# endif /* RLIMIT_STACK */
|
# endif /* RLIMIT_STACK */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user