mirror of https://github.com/Icinga/icinga2.git
parent
338d0aaa8c
commit
177f930375
|
@ -11,6 +11,7 @@
|
||||||
#include "base/defer.hpp"
|
#include "base/defer.hpp"
|
||||||
#include "base/logger.hpp"
|
#include "base/logger.hpp"
|
||||||
#include "base/application.hpp"
|
#include "base/application.hpp"
|
||||||
|
#include "base/process.hpp"
|
||||||
#include "base/timer.hpp"
|
#include "base/timer.hpp"
|
||||||
#include "base/utility.hpp"
|
#include "base/utility.hpp"
|
||||||
#include "base/exception.hpp"
|
#include "base/exception.hpp"
|
||||||
|
@ -504,6 +505,14 @@ static pid_t StartUnixWorker(const std::vector<std::string>& configs, bool close
|
||||||
_exit(EXIT_FAILURE);
|
_exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
Process::InitializeSpawnHelper();
|
||||||
|
} catch (const std::exception& ex) {
|
||||||
|
Log(LogCritical, "cli")
|
||||||
|
<< "Failed to initialize process spawn helper after forking (child): " << DiagnosticInformation(ex);
|
||||||
|
_exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
_exit(RunWorker(configs, closeConsoleLog, stderrFile));
|
_exit(RunWorker(configs, closeConsoleLog, stderrFile));
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
_exit(EXIT_FAILURE);
|
_exit(EXIT_FAILURE);
|
||||||
|
|
Loading…
Reference in New Issue