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

Signal handler for QUIT interupt. More...

Public Member Functions

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

Static Public Member Functions

static void set (const bool verbose)
 Activate SIGQUIT signal handler. More...
 
static void unset (const bool verbose)
 Deactivate SIGQUIT 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 QUIT 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 sigQuit.H.

Constructor & Destructor Documentation

◆ sigQuit()

sigQuit ( )

Construct null.

Definition at line 62 of file sigQuit.C.

References sigQuit::set().

Here is the call graph for this function:

◆ ~sigQuit()

~sigQuit ( )

Destructor.

Definition at line 70 of file sigQuit.C.

Member Function Documentation

◆ sigHandler()

void sigHandler ( int  )
staticprivate

Handler for caught signals.

Definition at line 40 of file sigQuit.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 SIGQUIT signal handler.

Definition at line 78 of file sigQuit.C.

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

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

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

◆ unset()

void unset ( const bool  verbose)
static

Deactivate SIGQUIT signal handler.

Definition at line 97 of file sigQuit.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 sigQuit.H.

◆ sigActive_

bool sigActive_ = false
staticprivate

Flag to indicate signal trapping is enabled.

Definition at line 65 of file sigQuit.H.


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