| 122 | } |
| 123 | |
| 124 | void 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 | |
| 152 | void Application::UninitializeBase() |
| 153 | { |
nothing calls this directly
no test coverage detected