MCPcopy Create free account
hub / github.com/awawa-dev/HyperHDR / install

Function install

sources/utils/DefaultSignalHandler.cpp:169–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167namespace DefaultSignalHandler
168{
169 void install()
170 {
171#ifndef _WIN32
172 Logger* log = Logger::getInstance("CORE");
173
174 struct sigaction action {};
175 sigemptyset(&action.sa_mask);
176 action.sa_sigaction = signal_handler;
177 action.sa_flags |= SA_SIGINFO;
178
179 for (const auto& s : ALL_SIGNALS)
180 {
181 if (sigaction(s.number, &action, nullptr) != 0)
182 {
183 Error(log, "Failed to install handler for %s]\n", s.name);
184 }
185 }
186#endif // _WIN32
187 }
188} // namespace DefaultSignalHandler

Callers 1

mainFunction · 0.85

Calls 1

sigactionClass · 0.85

Tested by

no test coverage detected