44 throw std::logic_error(
"At least one signal has to be specified.");
47 requestedSignals = signals;
51 if (requestedSignals == 0) {
52 throw std::logic_error(
"initSignalWaiter has to be called before" 56 std::cerr <<
"Waiting for termination signals is not implemented for " 57 "this platform. The program will still terminate when " 58 "such a signal is received but without shutting down " 66 if (requestedSignals == 0) {
67 throw std::logic_error(
"initSignalWaiter has to be called before" 68 " hasSignalArrived.");
85 throw std::logic_error(
"Invalid signal number");
void initSignalWaiter(int signals)
Prepare waiting for signals.
Signal waitForSignal()
Block until one of the signals specified in initSignalWaiter arrives, then return the signal...
Signal
Signals waitForSignal can wait for.
Artificial enum entry to indicate that no signal is meant at all.
Signal lastArrivedSignal()
Returns the last signal that has arrived at this process or Signal::NO_SIGNAL in case no signal arriv...
Interrupting the program has be requested.
int suggestedExitCode(Signal signal)
Return suggested exit code for exiting the program after receiving signal signal. ...
Quitting the program has be requested.
Terminating the program has be requested.