]> granicus.if.org Git - icinga2/commitdiff
Use _exit instead of Exit in Application::SetResourceLimits
authorGunnar Beutner <gunnar@beutner.name>
Mon, 2 Mar 2015 16:19:41 +0000 (17:19 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Mon, 2 Mar 2015 16:19:41 +0000 (17:19 +0100)
lib/base/application.cpp

index 0f42c6abfb9a618a1f4f2c3721d182f11ac5a90a..0bef83db3cb186752b810174b9c83e95207aacd0 100644 (file)
@@ -227,10 +227,9 @@ void Application::SetResourceLimits(void)
 
                new_argv[argc + 1] = NULL;
 
-               if (execvp(new_argv[0], new_argv) < 0)
-                       perror("execvp");
-
-               Exit(EXIT_FAILURE);
+               (void) execvp(new_argv[0], new_argv);
+               perror("execvp");
+               _exit(EXIT_FAILURE);
        }
 #      else /* RLIMIT_STACK */
        Log(LogNotice, "Application", "System does not support adjusting the resource limit for stack size (RLIMIT_STACK)");