signal
|
 |
A signal is a software interrupt;
UNIX supports about 30 signals, each of which has a unique integer code. The
signals are numbered sequentially, starting from the number one. A programmer
can specify that the current process react to a particular signal in one of
these ways.
- React in the default way,
which is often to terminate and possibly dump core
- Ignore the signal
- Execute a user-supplied
signal handler function
In addition, os_this_process
can be told to block certain signals. Blocked signals are queued and only
delivered if they are later unblocked. Some signals are sent so commonly that
they have a function named after them in os_process
and os_this_process .
Conversions permit
interchangeable use of os_signal and os_sig_t
.
Library
Platform<ToolKit> for
UNIX
Declaration
#include <ospace/unix/signal.h>
class os_signal
Interface
Constructor
os_signal(
const os_signal& signal )
Constructs an object that
is a copy of signal .
Constructor
os_signal(
os_sig_t code )
Constructs an object with
signal code code (default OS_UNDEFINED
).
<
bool
operator<( const os_signal& signal )
const
Returns true
if the code is less than signal .
=
os_signal&
operator=( os_sig_t signal )
Assigns an object from signal
.
=
os_signal&
operator=( const os_signal& signal )
Assigns an object from signal
.
==
bool
operator==( const os_signal& signal )
const
Returns true
if the code is the same as signal .
(os_sig_t)
operator
os_sig_t() const
Returns the code.
code
void
code( os_sig_t code )
Sets the code to code
.
code
os_sig_t
code() const
Returns the code.
defined
bool
defined() const
Returns true
if the code is a valid system signal.
print
void
print( ostream& stream )
const
Prints code and
description to stream .
Non-Member Functions
<<
ostream&
operator<<( ostream& stream ,
const os_signal& signal )
Prints signal
to stream .
Universal Streaming Service
#include <ospace/uss/unix.h>
<<
os_bstream&
operator<<( os_bstream& stream ,
const os_signal& signal )
Writes signal
to stream .
>>
os_bstream&
operator>>( os_bstream& stream ,
os_signal& signal )
Reads signal
from stream .
Copyright©1994-2026 Recursion
Software LLC
All Rights Reserved - For use by licensed users only. - For use by licensed
users only.