xentara-utils v2.0.3
The Xentara Utility Library
|
Helper class to temporarily block all signals. More...
#include <xentara/utils/posix/SignalBlocker.hpp>
Public Member Functions | |
SignalBlocker () | |
Constructor. | |
SignalBlocker (const sigset_t &signalMask) | |
Constructor that sets a specific signal mask. | |
~SignalBlocker () | |
Constructor. | |
Helper class to temporarily block all signals.
This class can be used to temporarily disable all signal on the current thread. This simplifies code that might have to deal with interrupted system calls (EINTR).
xentara::utils::posix::SignalBlocker::SignalBlocker | ( | ) |
Constructor.
This constructor blocks all blockable signals for the calling thread.
xentara::utils::posix::SignalBlocker::SignalBlocker | ( | const sigset_t & | signalMask | ) |
Constructor that sets a specific signal mask.
This constructor sets the signal mask of the current thread to the given mask.
signalMask | The desired signal mask. |
xentara::utils::posix::SignalBlocker::~SignalBlocker | ( | ) |
Constructor.
This destructor restores the original signal mask.