MCPcopy Create free account
hub / github.com/Icinga/icinga2 / InitializeBase

Method InitializeBase

lib/base/application.cpp:124–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124void Application::InitializeBase()
125{
126#ifdef _WIN32
127 /* disable GUI-based error messages for LoadLibrary() */
128 SetErrorMode(SEM_FAILCRITICALERRORS);
129
130 WSADATA wsaData;
131 if (WSAStartup(MAKEWORD(1, 1), &wsaData) != 0) {
132 BOOST_THROW_EXCEPTION(win32_error()
133 << boost::errinfo_api_function("WSAStartup")
134 << errinfo_win32_error(WSAGetLastError()));
135 }
136#else /* _WIN32 */
137 struct sigaction sa;
138 memset(&sa, 0, sizeof(sa));
139 sa.sa_handler = SIG_IGN;
140 sigaction(SIGPIPE, &sa, nullptr);
141#endif /* _WIN32 */
142
143 Loader::ExecuteDeferredInitializers();
144
145 /* Make sure the thread pool gets initialized. */
146 GetTP().Start();
147
148 /* Make sure the timer thread gets initialized. */
149 Timer::Initialize();
150}
151
152void Application::UninitializeBase()
153{

Callers

nothing calls this directly

Calls 3

win32_errorClass · 0.85
sigactionClass · 0.70
StartMethod · 0.45

Tested by

no test coverage detected