Public Member Functions | Static Public Member Functions | Static Private Member Functions | Static Private Attributes
sigSegv Class Reference

Signal handler for SEGV interupt. More...

Public Member Functions

 sigSegv ()
 Construct null. More...
 
 ~sigSegv ()
 Destructor. More...
 

Static Public Member Functions

static void set (const bool verbose)
 Activate SIGSEGV signal handler. More...
 
static void unset (const bool verbose)
 Deactivate SIGSEGV signal handler. More...
 

Static Private Member Functions

static void sigHandler (int)
 Handler for caught signals. More...
 

Static Private Attributes

static struct sigaction oldAction_
 Saved old signal trapping setting. More...
 
static bool sigActive_ = false
 Flag to indicate signal trapping is enabled. More...
 

Detailed Description

Signal handler for SEGV interupt.

The standard interupt handler is overridden to ensure that the runningJob file is removed. Can be used either directly through the static member functions or through the scope of the object (constructor sets trapping; destructor restores original).

See also
Foam::JobInfo
Source files

Definition at line 57 of file sigSegv.H.

Constructor & Destructor Documentation

◆ sigSegv()

sigSegv ( )

Construct null.

Definition at line 62 of file sigSegv.C.

References sigSegv::set().

Here is the call graph for this function:

◆ ~sigSegv()

~sigSegv ( )

Destructor.

Definition at line 70 of file sigSegv.C.

Member Function Documentation

◆ sigHandler()

void sigHandler ( int  )
staticprivate

Handler for caught signals.

Definition at line 40 of file sigSegv.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, Foam::jobInfo, Foam::Perr, and JobInfo::signalEnd().

Here is the call graph for this function:

◆ set()

void set ( const bool  verbose)
static

Activate SIGSEGV signal handler.

Definition at line 78 of file sigSegv.C.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Referenced by argList::parse(), and sigSegv::sigSegv().

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

◆ unset()

void unset ( const bool  verbose)
static

Deactivate SIGSEGV signal handler.

Definition at line 97 of file sigSegv.C.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

Field Documentation

◆ oldAction_

struct sigaction oldAction_
staticprivate

Saved old signal trapping setting.

Definition at line 62 of file sigSegv.H.

◆ sigActive_

bool sigActive_ = false
staticprivate

Flag to indicate signal trapping is enabled.

Definition at line 65 of file sigSegv.H.


The documentation for this class was generated from the following files: