BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnCoreDumpGuard.cxx File Reference
#include "BmnCoreDumpGuard.h"
#include <csignal>
#include <cstdlib>
#include <cstring>
Include dependency graph for BmnCoreDumpGuard.cxx:

Go to the source code of this file.

Functions

static int GetFatalSignalIndex (int signalNumber)
static void BmnFatalSignalHandler (int signalNumber, siginfo_t *signalInfo, void *signalContext)

Variables

static const int gFatalSignals [] = {SIGABRT, SIGSEGV, SIGBUS, SIGFPE, SIGILL}
static const int gFatalSignalCount = sizeof(gFatalSignals) / sizeof(gFatalSignals[0])
static struct sigaction gPreviousActions [gFatalSignalCount]
static bool gIsSignalGuarded [gFatalSignalCount]
static volatile sig_atomic_t gIsHandlingSignal = 0

Function Documentation

◆ BmnFatalSignalHandler()

void BmnFatalSignalHandler ( int signalNumber,
siginfo_t * signalInfo,
void * signalContext )
static

Definition at line 36 of file BmnCoreDumpGuard.cxx.

References GetFatalSignalIndex(), gIsHandlingSignal, gPreviousActions, and memset().

Referenced by BmnCoreDumpGuard::Install().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFatalSignalIndex()

int GetFatalSignalIndex ( int signalNumber)
static

Definition at line 27 of file BmnCoreDumpGuard.cxx.

References gFatalSignalCount, gFatalSignals, and i.

Referenced by BmnFatalSignalHandler().

Here is the caller graph for this function:

Variable Documentation

◆ gFatalSignalCount

const int gFatalSignalCount = sizeof(gFatalSignals) / sizeof(gFatalSignals[0])
static

◆ gFatalSignals

const int gFatalSignals[] = {SIGABRT, SIGSEGV, SIGBUS, SIGFPE, SIGILL}
static

◆ gIsHandlingSignal

volatile sig_atomic_t gIsHandlingSignal = 0
static

Definition at line 24 of file BmnCoreDumpGuard.cxx.

Referenced by BmnFatalSignalHandler().

◆ gIsSignalGuarded

bool gIsSignalGuarded[gFatalSignalCount]
static

Definition at line 22 of file BmnCoreDumpGuard.cxx.

Referenced by BmnCoreDumpGuard::Install(), and BmnCoreDumpGuard::Uninstall().

◆ gPreviousActions

struct sigaction gPreviousActions[gFatalSignalCount]
static