48 if (sigaction(sigNum, &
oldAction_,
nullptr) < 0)
51 <<
"Cannot unset " << what <<
" signal (" << sigNum
52 <<
") trapping" <<
endl 58 static void setHandler(
const char *what,
int sigNum,
void (*handler)(
int))
60 struct sigaction newAction;
61 newAction.sa_handler = handler;
62 newAction.sa_flags = SA_NODEFER;
63 sigemptyset(&newAction.sa_mask);
64 if (sigaction(sigNum, &newAction, &
oldAction_) < 0)
67 <<
"Could not set " << what <<
" signal (" << sigNum
68 <<
") trapping" <<
endl static struct sigaction oldAction_
static void setHandler(const char *what, int sigNum, void(*handler)(int))
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void resetHandler(const char *what, int sigNum)
errorManip< error > abort(error &err)