Public Member Functions | Static Public Member Functions | Static Private Member Functions | Static Private Attributes | Friends
sigWriteNow Class Reference

Signal handler for interupt defined by OptimisationSwitches::writeNowSignal. More...

Public Member Functions

 sigWriteNow ()
 Construct null. More...
 
 sigWriteNow (const bool verbose, Time &runTime)
 Construct from components. More...
 
 ~sigWriteNow ()
 Destructor. More...
 
bool active () const
 Is active? More...
 

Static Public Member Functions

static void set (const bool verbose)
 (re)set signal catcher More...
 

Static Private Member Functions

static void sigHandler (int)
 

Static Private Attributes

static int signal_
 Number of signal to use. More...
 
static struct sigaction oldAction_
 Saved old signal trapping setting. More...
 

Friends

class sigStopAtWriteNow
 
class addwriteNowSignalToOpt
 wip. Have setter have access to signal_ More...
 

Detailed Description

Signal handler for interupt defined by OptimisationSwitches::writeNowSignal.

Write once and continue.

Source files

Definition at line 52 of file sigWriteNow.H.

Constructor & Destructor Documentation

◆ sigWriteNow() [1/2]

Construct null.

Definition at line 89 of file sigWriteNow.C.

◆ sigWriteNow() [2/2]

sigWriteNow ( const bool  verbose,
Time runTime 
)

Construct from components.

Definition at line 93 of file sigWriteNow.C.

References runTimePtr_.

◆ ~sigWriteNow()

Destructor.

Definition at line 104 of file sigWriteNow.C.

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

Here is the call graph for this function:

Member Function Documentation

◆ sigHandler()

void sigHandler ( int  )
staticprivate

Definition at line 76 of file sigWriteNow.C.

References Foam::endl(), Foam::Info, Foam::nl, runTimePtr_, and Time::writeOnce().

Here is the call graph for this function:

◆ set()

void set ( const bool  verbose)
static

(re)set signal catcher

Definition at line 121 of file sigWriteNow.C.

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

Referenced by addwriteNowSignalToOpt::readData().

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

◆ active()

bool active ( ) const

Is active?

Definition at line 146 of file sigWriteNow.C.

Friends And Related Function Documentation

◆ sigStopAtWriteNow

friend class sigStopAtWriteNow
friend

Definition at line 69 of file sigWriteNow.H.

◆ addwriteNowSignalToOpt

friend class addwriteNowSignalToOpt
friend

wip. Have setter have access to signal_

Definition at line 72 of file sigWriteNow.H.

Field Documentation

◆ signal_

int signal_
staticprivate

Number of signal to use.

Definition at line 57 of file sigWriteNow.H.

Referenced by addwriteNowSignalToOpt::readData(), sigStopAtWriteNow::set(), and addwriteNowSignalToOpt::writeData().

◆ oldAction_

struct sigaction oldAction_
staticprivate

Saved old signal trapping setting.

Definition at line 60 of file sigWriteNow.H.


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