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

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

Public Member Functions

 sigStopAtWriteNow ()
 Construct null. More...
 
 sigStopAtWriteNow (const bool verbose, const Time &runTime)
 Construct from components. More...
 
 ~sigStopAtWriteNow ()
 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 addstopAtWriteNowSignalToOpt
 wip. Have setter have access to signal_ More...
 

Detailed Description

Signal handler for interupt defined by OptimisationSwitches::stopAtWriteNowSignal.

Write and stop the job.

Source files

Definition at line 53 of file sigStopAtWriteNow.H.

Constructor & Destructor Documentation

◆ sigStopAtWriteNow() [1/2]

Construct null.

Definition at line 103 of file sigStopAtWriteNow.C.

◆ sigStopAtWriteNow() [2/2]

sigStopAtWriteNow ( const bool  verbose,
const Time runTime 
)

Construct from components.

Definition at line 107 of file sigStopAtWriteNow.C.

References runTimePtr_.

◆ ~sigStopAtWriteNow()

Destructor.

Definition at line 121 of file sigStopAtWriteNow.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 78 of file sigStopAtWriteNow.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, Foam::Info, Foam::jobInfo, Foam::nl, runTimePtr_, JobInfo::signalEnd(), and Time::stopAt().

Here is the call graph for this function:

◆ set()

void set ( const bool  verbose)
static

(re)set signal catcher

Definition at line 138 of file sigStopAtWriteNow.C.

References Foam::abort(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::findEtcFile(), Foam::Info, and sigWriteNow::signal_.

Referenced by addstopAtWriteNowSignalToOpt::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 175 of file sigStopAtWriteNow.C.

Friends And Related Function Documentation

◆ addstopAtWriteNowSignalToOpt

friend class addstopAtWriteNowSignalToOpt
friend

wip. Have setter have access to signal_

Definition at line 71 of file sigStopAtWriteNow.H.

Field Documentation

◆ signal_

int signal_
staticprivate

Number of signal to use.

Definition at line 58 of file sigStopAtWriteNow.H.

Referenced by addstopAtWriteNowSignalToOpt::readData(), and addstopAtWriteNowSignalToOpt::writeData().

◆ oldAction_

struct sigaction oldAction_
staticprivate

Saved old signal trapping setting.

Definition at line 61 of file sigStopAtWriteNow.H.


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