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

Signal handler for INT interupt. More...

Public Member Functions

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

Static Public Member Functions

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

Static Private Member Functions

static void sigHandler (int)
 

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 INT 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 58 of file sigInt.H.

Constructor & Destructor Documentation

◆ sigInt()

sigInt ( )

Construct null.

Definition at line 60 of file sigInt.C.

References sigInt::set().

Here is the call graph for this function:

◆ ~sigInt()

~sigInt ( )

Destructor.

Definition at line 68 of file sigInt.C.

Member Function Documentation

◆ sigHandler()

void sigHandler ( int  )
staticprivate

Definition at line 40 of file sigInt.C.

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

Here is the call graph for this function:

◆ set()

void set ( const bool  verbose)
static

Activate SIGINT signal handler.

Definition at line 76 of file sigInt.C.

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

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

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

◆ unset()

void unset ( const bool  verbose)
static

Deactivate SIGINT signal handler.

Definition at line 95 of file sigInt.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 63 of file sigInt.H.

◆ sigActive_

bool sigActive_ = false
staticprivate

Flag to indicate signal trapping is enabled.

Definition at line 66 of file sigInt.H.


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