MCPcopy Create free account
hub / github.com/beefytech/Beef / BfpSystem_Init

Function BfpSystem_Init

BeefySysLib/platform/posix/PosixCommon.cpp:553–579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

551}
552
553BFP_EXPORT void BFP_CALLTYPE BfpSystem_Init(int version, BfpSystemInitFlags flags)
554{
555 BfpGetGlobalData();
556
557 if (version != BFP_VERSION)
558 {
559 BfpSystem_FatalError(StrFormat("Bfp build version '%d' does not match requested version '%d'", BFP_VERSION, version).c_str(), "BFP FATAL ERROR");
560 }
561
562 struct sigaction ignoreAction = { SIG_IGN };
563 sigaction(SIGPIPE, &ignoreAction, NULL);
564
565 //if (ptrace(PTRACE_TRACEME, 0, 1, 0) != -1)
566 {
567 //ptrace(PTRACE_DETACH, 0, 1, 0);
568 //signal(SIGSEGV, SigHandler);
569 //signal(SIGFPE, SigHandler);
570 //signal(SIGABRT, SigHandler);
571
572 /*struct sigaction action;
573 memset(&action, 0, sizeof(action));
574 action.sa_sigaction = signal_segv;
575 action.sa_flags = SA_SIGINFO;
576 if(sigaction(SIGSEGV, &action, NULL) < 0)
577 perror("sigaction");*/
578 }
579}
580
581BFP_EXPORT void BFP_CALLTYPE BfpSystem_InitCrashCatcher(BfpSystemInitFlags flags)
582{

Callers

nothing calls this directly

Calls 4

BfpGetGlobalDataFunction · 0.85
BfpSystem_FatalErrorFunction · 0.70
sigactionClass · 0.70
c_strMethod · 0.45

Tested by

no test coverage detected