sigStopAtWriteNow Class Reference

Signal handler to write and exit when the stopAtWriteNowSignal is sent. 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...
 

Friends

class addstopAtWriteNowSignalToOpt
 wip. Have setter have access to signal_ More...
 

Detailed Description

Signal handler to write and exit when the stopAtWriteNowSignal is sent.

stopAtWriteNowSignal is set in etc/controlDict::OptimisationSwitches, e.g.

OptimisationSwitches
{
    .
    .
    // Force dumping and exit (at next timestep) upon signal (-1 to disable)
    stopAtWriteNowSignal        12; // SIGUSR2
    .
    .
}
Source files

Definition at line 63 of file sigStopAtWriteNow.H.

Constructor & Destructor Documentation

◆ sigStopAtWriteNow() [1/2]

Construct null.

Definition at line 77 of file sigStopAtWriteNow.C.

◆ sigStopAtWriteNow() [2/2]

sigStopAtWriteNow ( const bool  verbose,
const Time runTime 
)

Construct from components.

Definition at line 80 of file sigStopAtWriteNow.C.

◆ ~sigStopAtWriteNow()

Destructor.

Definition at line 95 of file sigStopAtWriteNow.C.

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

Here is the call graph for this function:

Member Function Documentation

◆ set()

void set ( const bool  verbose)
static

(re)set signal catcher

Definition at line 112 of file sigStopAtWriteNow.C.

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

Here is the call graph for this function:

◆ active()

bool active ( ) const

Is active?

Definition at line 148 of file sigStopAtWriteNow.C.

Friends And Related Function Documentation

◆ addstopAtWriteNowSignalToOpt

friend class addstopAtWriteNowSignalToOpt
friend

wip. Have setter have access to signal_

Definition at line 85 of file sigStopAtWriteNow.H.


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