12#include <initializer_list>
14#include <sys/signalfd.h>
18#include "PollerFd.hpp"
64 using Callback = std::move_only_function<void (signalfd_siginfo
const &)>;
78 std::initializer_list<int> signals,
Convenience macros to explicitly control copy and move semantics.
#define DISABLE_COPY_AND_MOVE(ClassName)
Disable both copy and move.
Definition CopyMoveControl.hpp:37
Macro-based enum <-> string utilities for dfx.
#define DECLARE_ENUM_STRING_FUNCTIONS(E)
Declare the enum string API (and std::formatter) for enum type E.
Definition EnumString.hpp:327
Event interest and trigger flags for file-descriptor watching (Linux/epoll).
Typesafe enum bitmask wrapper and helper macros.
#define DECLARE_OPERATOR_FOR_FLAGS(FlagsName)
Declare a free operator| to combine two enum values into a Flags.
Definition Flags.hpp:291
#define DECLARE_STD_FORMATTER_FOR_FLAGS(FlagsName)
Declare a std::formatter<FlagsName> that prints set flags joined by |.
Definition Flags.hpp:308
#define DECLARE_FLAGS(FlagsName, Enum)
Declare a convenient alias for dfx::Utils::Flags<Enum>.
Definition Flags.hpp:275
Bitset wrapper for dfx::FdWatch::EventTrigger values.
RAII wrapper for the registration of a FD in a Poller.
Definition PollerFd.hpp:42
Abstract interface for FD-based event polling.
Definition Poller.hpp:37
std::move_only_function< void(signalfd_siginfo const &)> Callback
Callback invoked for each received signal. The callback receives the signalfd_siginfo payload read fr...
Definition SignalFdWatcher.hpp:64
SignalFdWatcher(Poller &poller, std::initializer_list< int > signals, Callback cb, SigChldModes sigChldModes=SigChldMode::Default)
Constructs a watcher and registers the internal signalfd into the poller.
SigChldMode
Additional behavior configuration for SIGCHLD.
Definition SignalFdWatcher.hpp:54
@ Default
Default SIGCHLD behavior.
Definition SignalFdWatcher.hpp:55
@ NoChldWait
Request that child exit does not leave zombies (SA_NOCLDWAIT).
Definition SignalFdWatcher.hpp:57
@ NoChldStop
Do not generate SIGCHLD when children stop/continue (SA_NOCLDSTOP).
Definition SignalFdWatcher.hpp:56
Definition SocketClient.hpp:23