MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / xh_core_add_sigsegv_handler

Function xh_core_add_sigsegv_handler

Bcore/src/main/cpp/xhook/xh_core.c:100–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98 sigaction(SIGSEGV, &xh_core_sigsegv_act_old, NULL);
99}
100static int xh_core_add_sigsegv_handler()
101{
102 struct sigaction act;
103
104 if(!xh_core_sigsegv_enable) return 0;
105
106 if(0 != sigemptyset(&act.sa_mask)) return (0 == errno ? XH_ERRNO_UNKNOWN : errno);
107 act.sa_handler = xh_core_sigsegv_handler;
108
109 if(0 != sigaction(SIGSEGV, &act, &xh_core_sigsegv_act_old))
110 return (0 == errno ? XH_ERRNO_UNKNOWN : errno);
111
112 return 0;
113}
114static void xh_core_del_sigsegv_handler()
115{
116 if(!xh_core_sigsegv_enable) return;

Callers 1

xh_core_init_onceFunction · 0.85

Calls 1

sigactionClass · 0.70

Tested by

no test coverage detected