eve.core.linux.signals

Linux signal handling with signalfd and pthread_sigmask.

This module manages signal mask state and provides signal watcher operations for EventLoop. It isolates Linux-specific signalfd and pthread_sigmask logic.

Types 1

Signal mask state manager for Linux EventLoop.

Manages signal mask blocking and restoration using pthread_sigmask. Works with EventLoop watcher slots to determine active signals.

Fields
bool _maskActive
bool _hasSavedMask
sigset_t _savedMask
Methods
Handle createSignalHandle(sigset_t mask) static @trusted nothrowCreate a signalfd handle for the given signal mask.
bool hasSignalWatcher(Slot)(const(Slot)[] slots, Signal signal) static @safe nothrow @nogcCheck if a specific signal has an active watcher in the given slots.
bool anySignalWatchers(Slot)(const(Slot)[] slots) static @safe nothrow @nogcCheck if any signal watchers exist in the given slots.
int blockSignalMask(sigset_t mask) @trusted nothrowBlock a signal mask using pthread_sigmask.
int refreshSignalMask(Slot)(const(Slot)[] slots) @trusted nothrowRefresh the signal mask based on active signal watchers.
int restoreSignalMask() @trusted nothrowRestore the original signal mask that was saved before any blocking.
bool isActive() const @safe nothrow @nogcCheck if the signal mask is currently active.