Classes | |
class | SignalException |
Mother class for all signal-related exceptions. More... | |
Typedefs | |
typedef void(* | SignalHandler )(int) |
SignalHandler is a pointer to function. | |
typedef Ceylan::Uint16 | SignalNumber |
Signal numbers, as described in the original POSIX.1 standard. | |
Functions | |
CEYLAN_DLL void | setToDefaultHandler (SignalNumber signalNumber) |
Sets the default handler for the specified signal. | |
CEYLAN_DLL void | ignore (SignalNumber signalNumber) |
Ignores specified signal from now on. | |
CEYLAN_DLL void | setHandler (SignalNumber signalNumber, SignalHandler newHandler) |
Sets a new handler for the specified signal type. | |
CEYLAN_DLL void | raise (SignalNumber signalNumber) |
Raises the specified signal: sends the signal to the current process. | |
CEYLAN_DLL const std::string | toString (SignalNumber signalNumber) |
Returns a user-friendly description of the signal. | |
Variables | |
CEYLAN_DLL const SignalHandler | IgnoringHandler = 0 |
Pre-defined handler which ignores signals. | |
CEYLAN_DLL const SignalHandler | DefaultHandler = 0 |
The default handler, triggering the corresponding action as defined for the actual signal (ignore, terminate, core dump, etc. | |
CEYLAN_DLL const SignalNumber | HangUp = 1 |
Hangup detected on controlling terminal or death of controlling process (SIGHUP). | |
CEYLAN_DLL const SignalNumber | InterruptFromKeyboard = 2 |
Interrupt from keyboard (SIGINT). | |
CEYLAN_DLL const SignalNumber | QuitFromKeyboard = 3 |
Quit from keyboard (SIGQUIT). | |
CEYLAN_DLL const SignalNumber | IllegalInstruction = 4 |
Illegal Instruction (SIGILL). | |
CEYLAN_DLL const SignalNumber | Abort = 5 |
Abort signal from abort (SIGABRT). | |
CEYLAN_DLL const SignalNumber | FloatingPointException = 6 |
Floating point exception (SIGFPE). | |
CEYLAN_DLL const SignalNumber | Kill = 7 |
Kill signal (SIGKILL). | |
CEYLAN_DLL const SignalNumber | InvalidMemoryReference = 8 |
Invalid memory reference (SIGSEGV). | |
CEYLAN_DLL const SignalNumber | BrokenPipe = 9 |
Broken pipe: write to pipe with no readers (SIGPIPE). | |
CEYLAN_DLL const SignalNumber | TimerSignal = 10 |
Timer signal from alarm (SIGALRM). | |
CEYLAN_DLL const SignalNumber | Termination = 11 |
Termination signal (SIGTERM). | |
CEYLAN_DLL const SignalNumber | FirstUserDefined = 12 |
First user-defined signal (SIGUSR1). | |
CEYLAN_DLL const SignalNumber | SecondUserDefined = 13 |
Second user-defined signal (SIGUSR2). | |
CEYLAN_DLL const SignalNumber | ChildEnded = 14 |
Child stopped or terminated (SIGCHLD). | |
CEYLAN_DLL const SignalNumber | Continue = 15 |
Continue if stopped (SIGCONT). | |
CEYLAN_DLL const SignalNumber | Stop = 16 |
Stop process (SIGSTOP). | |
CEYLAN_DLL const SignalNumber | TtyStopped = 17 |
Stop typed at tty (SIGTSTP). | |
CEYLAN_DLL const SignalNumber | TtyInput = 18 |
tty input for background process (SIGTTIN). | |
CEYLAN_DLL const SignalNumber | TtyOutput = 19 |
tty output for background process (SIGTTOU). |
typedef void(* Ceylan::System::Signal::SignalHandler)(int) |
SignalHandler is a pointer to function.
Definition at line 76 of file CeylanSignal.h.
Signal numbers, as described in the original POSIX.1 standard.
Definition at line 97 of file CeylanSignal.h.
void Ceylan::System::Signal::ignore | ( | SignalNumber | signalNumber | ) |
Ignores specified signal from now on.
SignalException | iff the operation failed, including if signal support is not available. |
Definition at line 232 of file CeylanSignal.cc.
References IgnoringHandler, and setHandler().
Referenced by Ceylan::Network::MultiplexedServerStreamSocket::run().
void Ceylan::System::Signal::raise | ( | SignalNumber | signalNumber | ) |
Raises the specified signal: sends the signal to the current process.
SignalException | iff the operation failed, including if signal support is not available. |
Definition at line 241 of file CeylanSignal.cc.
void Ceylan::System::Signal::setHandler | ( | SignalNumber | signalNumber, | |
SignalHandler | newHandler | |||
) |
Sets a new handler for the specified signal type.
SignalException | iff the operation failed, including if signal support is not available. |
Definition at line 201 of file CeylanSignal.cc.
References toString().
Referenced by ignore(), and setToDefaultHandler().
void Ceylan::System::Signal::setToDefaultHandler | ( | SignalNumber | signalNumber | ) |
Sets the default handler for the specified signal.
SignalException | iff the operation failed, including if signal support is not available. |
Definition at line 223 of file CeylanSignal.cc.
References DefaultHandler, and setHandler().
const std::string Ceylan::System::Signal::toString | ( | SignalNumber | signalNumber | ) |
Returns a user-friendly description of the signal.
signal | the signal to describe. |
Definition at line 258 of file CeylanSignal.cc.
References Abort, BrokenPipe, ChildEnded, Continue, FirstUserDefined, FloatingPointException, HangUp, IllegalInstruction, InterruptFromKeyboard, InvalidMemoryReference, Kill, QuitFromKeyboard, SecondUserDefined, Stop, Termination, TimerSignal, TtyInput, TtyOutput, and TtyStopped.
Referenced by setHandler().
const Sig Ceylan::System::Signal::Abort = 5 |
Abort signal from abort (SIGABRT).
Default action is to terminate the process and dump core.
Definition at line 157 of file CeylanSignal.cc.
Referenced by toString().
const Sig Ceylan::System::Signal::BrokenPipe = 9 |
Broken pipe: write to pipe with no readers (SIGPIPE).
Default action is to terminate the process.
Definition at line 161 of file CeylanSignal.cc.
Referenced by Ceylan::Network::MultiplexedServerStreamSocket::run(), and toString().
const Sig Ceylan::System::Signal::ChildEnded = 14 |
Child stopped or terminated (SIGCHLD).
Default action is to ignore the signal.
Definition at line 166 of file CeylanSignal.cc.
Referenced by toString().
const Sig Ceylan::System::Signal::Continue = 15 |
Continue if stopped (SIGCONT).
No default action.
Definition at line 167 of file CeylanSignal.cc.
Referenced by toString().
The default handler, triggering the corresponding action as defined for the actual signal (ignore, terminate, core dump, etc.
).
Definition at line 71 of file CeylanSignal.cc.
Referenced by setToDefaultHandler().
const Sig Ceylan::System::Signal::FirstUserDefined = 12 |
First user-defined signal (SIGUSR1).
Default action is to terminate the process.
Definition at line 164 of file CeylanSignal.cc.
Referenced by toString().
Floating point exception (SIGFPE).
Default action is to terminate the process and dump core.
Definition at line 158 of file CeylanSignal.cc.
Referenced by toString().
const Sig Ceylan::System::Signal::HangUp = 1 |
Hangup detected on controlling terminal or death of controlling process (SIGHUP).
Default action is to terminate the process.
Definition at line 153 of file CeylanSignal.cc.
Referenced by toString().
Pre-defined handler which ignores signals.
Definition at line 68 of file CeylanSignal.cc.
Referenced by ignore().
Illegal Instruction (SIGILL).
Default action is to terminate the process and dump core.
Definition at line 156 of file CeylanSignal.cc.
Referenced by toString().
Interrupt from keyboard (SIGINT).
Default action is to terminate the process.
Definition at line 154 of file CeylanSignal.cc.
Referenced by toString().
Invalid memory reference (SIGSEGV).
Default action is to terminate the process and dump core.
Definition at line 160 of file CeylanSignal.cc.
Referenced by toString().
const Sig Ceylan::System::Signal::Kill = 7 |
Kill signal (SIGKILL).
Default action is to terminate the process.
Definition at line 159 of file CeylanSignal.cc.
Referenced by toString().
const Sig Ceylan::System::Signal::QuitFromKeyboard = 3 |
Quit from keyboard (SIGQUIT).
Default action is to terminate the process and dump core.
Definition at line 155 of file CeylanSignal.cc.
Referenced by toString().
const Sig Ceylan::System::Signal::SecondUserDefined = 13 |
Second user-defined signal (SIGUSR2).
Default action is to terminate the process.
Definition at line 165 of file CeylanSignal.cc.
Referenced by toString().
const Sig Ceylan::System::Signal::Stop = 16 |
Stop process (SIGSTOP).
Default action is to stop the process.
Definition at line 168 of file CeylanSignal.cc.
Referenced by toString().
const Sig Ceylan::System::Signal::Termination = 11 |
Termination signal (SIGTERM).
Default action is to terminate the process.
Definition at line 163 of file CeylanSignal.cc.
Referenced by toString().
const Sig Ceylan::System::Signal::TimerSignal = 10 |
Timer signal from alarm (SIGALRM).
Default action is to terminate the process.
Definition at line 162 of file CeylanSignal.cc.
Referenced by toString().
const Sig Ceylan::System::Signal::TtyInput = 18 |
tty input for background process (SIGTTIN).
Default action is to stop the process.
Definition at line 170 of file CeylanSignal.cc.
Referenced by toString().
const Sig Ceylan::System::Signal::TtyOutput = 19 |
tty output for background process (SIGTTOU).
Default action is to stop the process.
Definition at line 171 of file CeylanSignal.cc.
Referenced by toString().
const Sig Ceylan::System::Signal::TtyStopped = 17 |
Stop typed at tty (SIGTSTP).
Default action is to stop the process.
Definition at line 169 of file CeylanSignal.cc.
Referenced by toString().