Function FatalConditionHandler

Synopsis

#include <include/internal/catch_fatal_condition.h>

FatalConditionHandler()

Description

No description yet.

Source

Lines 125-139 in include/internal/catch_fatal_condition.cpp. Line 51 in include/internal/catch_fatal_condition.h.

FatalConditionHandler::FatalConditionHandler() {
    isSet = true;
    stack_t sigStack;
    sigStack.ss_sp = altStackMem;
    sigStack.ss_size = sigStackSize;
    sigStack.ss_flags = 0;
    sigaltstack(&sigStack, &oldSigStack);
    struct sigaction sa = { };
    sa.sa_handler = handleSignal;
    sa.sa_flags = SA_ONSTACK;
    for (std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i) {
        sigaction(signalDefs[i].id, &sa, &oldSigActions[i]);
    }
}





Add Discussion as Guest

Log in