Rudiments
Static Public Member Functions | List of all members
signalmanager Class Reference

Static Public Member Functions

static uint32_t alarm (uint32_t seconds)
 
static bool ignoreSignals (signalset *sset)
 
static bool waitForSignals (signalset *mask)
 
static bool getBlockedSignals (signalset *sset)
 

Detailed Description

The signalmanager class provides methods for sending, blocking and waiting for signals.

Member Function Documentation

◆ alarm()

static uint32_t signalmanager::alarm ( uint32_t  seconds)
static

Sends signal SIGALRM to self after "seconds" have elapsed. If "seconds" is 0, the alarm is disabled. Calling this method cancels any previously set alarm.

Returns the number of seconds that were remaining until any previously scheduled alarm was to be delivered or 0 if there was no previously scheduled alarm.

◆ getBlockedSignals()

static bool signalmanager::getBlockedSignals ( signalset sset)
static

Sets "sset" to the set of signals that were raised, but blocked during the most recent call to waitForSignals(). Returns true on success and false on failure.

◆ ignoreSignals()

static bool signalmanager::ignoreSignals ( signalset sset)
static

Ignore signal "signum". Returns true on success and false on failure.

◆ waitForSignals()

static bool signalmanager::waitForSignals ( signalset mask)
static

Wait until a signal NOT in the signal set "mask" has been received. Returns true on success and false on failure.