Go to the documentation of this file.
71 struct sigaction
Foam::sigWriteNow::oldAction_;
78 Info<<
"sigWriteNow :"
79 <<
" setting up write at end of the next iteration" <<
nl <<
endl;
109 if (sigaction(signal_, &oldAction_, NULL) < 0)
112 <<
"Cannot reset " << signal_ <<
" trapping"
125 struct sigaction newAction;
126 newAction.sa_handler = sigHandler;
127 newAction.sa_flags = SA_NODEFER;
128 sigemptyset(&newAction.sa_mask);
129 if (sigaction(signal_, &newAction, &oldAction_) < 0)
132 <<
"Cannot set " << signal_ <<
" trapping"
138 Info<<
"sigWriteNow :"
139 <<
" Enabling writing upon signal " << signal_
static int signal_
Number of signal to use.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual ~addwriteNowSignalToOpt()
sigWriteNow()
Construct null.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void writeOnce()
Write the objects once (one shot) and continue the run.
~sigWriteNow()
Destructor.
int optimisationSwitch(const char *name, const int defaultValue=0)
Lookup optimisation switch or add default value.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
static void set(const bool verbose)
(re)set signal catcher
virtual void writeData(Foam::Ostream &os) const
Write.
errorManip< error > abort(error &err)
virtual void readData(Foam::Istream &is)
Read.
bool active() const
Is active?
static void sigHandler(int)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static Foam::Time * runTimePtr_
addwriteNowSignalToOpt(const char *name)
label readLabel(Istream &is)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void addOptimisationObject(const char *name, simpleRegIOobject *obj)
Register optimisation switch read/write object.
Abstract base class for registered object with I/O. Used in debug symbol registration.
word name(const complex &)
Return a string representation of a complex.
addwriteNowSignalToOpt addwriteNowSignalToOpt_("writeNowSignal")