mirror of https://github.com/Icinga/icinga2.git
parent
3a44935f2d
commit
666c92fa76
|
@ -133,6 +133,7 @@ endif()
|
|||
check_function_exists(vfork HAVE_VFORK)
|
||||
check_function_exists(backtrace_symbols HAVE_BACKTRACE_SYMBOLS)
|
||||
check_function_exists(pipe2 HAVE_PIPE2)
|
||||
check_function_exists(nice HAVE_NICE)
|
||||
check_library_exists(dl dladdr "dlfcn.h" HAVE_DLADDR)
|
||||
check_library_exists(execinfo backtrace_symbols "" HAVE_LIBEXECINFO)
|
||||
check_include_file_cxx(cxxabi.h HAVE_CXXABI_H)
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#cmakedefine HAVE_DLADDR
|
||||
#cmakedefine HAVE_LIBEXECINFO
|
||||
#cmakedefine HAVE_CXXABI_H
|
||||
#cmakedefine HAVE_NICE
|
||||
|
||||
#cmakedefine ICINGA2_UNITY_BUILD
|
||||
|
||||
|
|
|
@ -527,8 +527,10 @@ void Process::Run(const boost::function<void(const ProcessResult&)>& callback)
|
|||
(void)close(fds[0]);
|
||||
(void)close(fds[1]);
|
||||
|
||||
#ifdef HAVE_NICE
|
||||
if (nice(5) < 0)
|
||||
Log(LogWarning, "base", "Failed to renice child process.");
|
||||
#endif /* HAVE_NICE */
|
||||
|
||||
if (icinga2_execvpe(argv[0], argv, envp) < 0) {
|
||||
char errmsg[512];
|
||||
|
|
Loading…
Reference in New Issue