PosixSignalManagerImpl.cpp
//==============================================================================
// THIS FUNCTION IS ASYNC-SIGNAL-SAFE
// Intended to be called from a signal handler for the purpose of delivering a
// signal.  Delivery of signals is recorded in the signals map.  Use the
// isSignalDelivered() function to query the delivery status of a particular
// signal.
//==============================================================================
THIS FUNCTION IS ASYNC-SIGNAL-SAFE
Intended to be called from a signal handler for the purpose of delivering a
signal.  Delivery of signals is recorded in the signals map.  Use the
isSignalDelivered() function to query the delivery status of a particular
signal.
THIS FUNCTION IS ASYNC - SIGNAL - SAFE Intended to be called from a signal handler for the purpose of delivering a signal . Delivery of signals is recorded in the signals map . Use the isSignalDelivered () function to query the delivery status of a particular signal .
void PosixSignalManagerImpl::signal(int sig)
{
    try
    {
        signals.at(sig).delivery_status = DELIVERED;
    }
    catch (std::out_of_range& ex)
    {
#if defined DEBUG
        std::cerr << "Unknown signal " << sig << " received, ignoring\n";
#endif
    }
}
void PosixSignalManagerImpl :: signal ( int sig ) { try { signals . at ( sig ) . delivery_status = DELIVERED ; } catch ( std :: out_of_range & ex ) { #if defined DEBUG std :: cerr << " " << sig << " \n " ; #endif } }
THIS FUNCTION IS ASYNC-SIGNAL-SAFE
Intended to be called from a signal handler for the purpose of delivering a
signal.
THIS FUNCTION IS ASYNC - SIGNAL - SAFE Intended to be called from a signal handler for the purpose of delivering a signal .
// at() will throw an out_of_range exception if the user gave us a // signal we don't recognize.  Let's not let an out_of_range exception // propagate out of here since we're probably running in a signal // handler.  I've seen strange behavior when exceptions propagate out of // this signal handler.