Module dharma::system [] [src]

System signal handling.

This module contains helper functionality for handling system signals.

Structs

SignalEventHandler

Implementation of dharma::EventHandler for handling system signals synchronously. For this to work receiving of signals SIGINT and SIGTERM must be blocked in all threads in application. Otherwise non-blocking threads will catch all signals.

Functions

block_signals

Blocks signals SIGINT, SIGTERM, SIGUSR1 and SIGUSR2 for current thread.

unblock_signals

Unblocks signals SIGINT, SIGTERM, SIGUSR1 and SIGUSR2 for current thread.