MCPcopy Create free account
hub / github.com/Selectively11/CloudRedirect / CallGuard

Method CallGuard

src/platform/linux/schema_fetch.cpp:119–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117class CallGuard {
118public:
119 CallGuard() {
120 struct sigaction sa = {};
121 sa.sa_handler = CrashHandler;
122 sigemptyset(&sa.sa_mask);
123 sa.sa_flags = SA_RESETHAND;
124 sigaction(SIGSEGV, &sa, &m_segv);
125 sigaction(SIGBUS, &sa, &m_bus);
126 // Don't trap SIGABRT: it fires async on the CM thread after this guard dies;
127 // let init.cpp's CrashDumpHandler own it.
128 g_inCall = 1;
129 }
130 ~CallGuard() {
131 g_inCall = 0;
132 sigaction(SIGSEGV, &m_segv, nullptr);

Callers

nothing calls this directly

Calls 1

sigactionClass · 0.70

Tested by

no test coverage detected