Rudiments: signalmanager Class Reference

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 (const signalset *sset)
static bool | waitForSignals (const signalset *mask)
static bool | examineBlockedSignals (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.

## ◆ examineBlockedSignals()

static bool signalmanager::examineBlockedSignals | ( | signalset * | sset | ) |
| static

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

## ◆ ignoreSignals()

static bool signalmanager::ignoreSignals | ( | const signalset * | sset | ) |
| static

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

## ◆ waitForSignals()

static bool signalmanager::waitForSignals | ( | const signalset * | mask | ) |
| static

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