Ceylan::System::Signal Namespace Reference

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 Documentation

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.


Function Documentation

void Ceylan::System::Signal::ignore ( SignalNumber  signalNumber  ) 

Ignores specified signal from now on.

Exceptions:
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.

Exceptions:
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.

Exceptions:
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.

Exceptions:
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.

Parameters:
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().


Variable Documentation

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().

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().

Child stopped or terminated (SIGCHLD).

Default action is to ignore the signal.

Definition at line 166 of file CeylanSignal.cc.

Referenced by toString().

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().

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().

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().

Kill signal (SIGKILL).

Default action is to terminate the process.

Note:
This signal cannot be caught, blocked, or ignored.

Definition at line 159 of file CeylanSignal.cc.

Referenced by toString().

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().

Second user-defined signal (SIGUSR2).

Default action is to terminate the process.

Definition at line 165 of file CeylanSignal.cc.

Referenced by toString().

Stop process (SIGSTOP).

Default action is to stop the process.

Note:
This signal cannot be caught, blocked, or ignored.

Definition at line 168 of file CeylanSignal.cc.

Referenced by toString().

Termination signal (SIGTERM).

Default action is to terminate the process.

Definition at line 163 of file CeylanSignal.cc.

Referenced by toString().

Timer signal from alarm (SIGALRM).

Default action is to terminate the process.

Definition at line 162 of file CeylanSignal.cc.

Referenced by toString().

tty input for background process (SIGTTIN).

Default action is to stop the process.

Definition at line 170 of file CeylanSignal.cc.

Referenced by toString().

tty output for background process (SIGTTOU).

Default action is to stop the process.

Definition at line 171 of file CeylanSignal.cc.

Referenced by toString().

Stop typed at tty (SIGTSTP).

Default action is to stop the process.

Definition at line 169 of file CeylanSignal.cc.

Referenced by toString().

Generated on Mon Nov 29 13:43:20 2010 for Ceylan by  doxygen 1.6.3