signalfd4
Signalfd4 is a Linux system call that creates a file descriptor for receiving signals delivered to a process, enabling asynchronous signal handling through I/O multiplexing rather than traditional signal handlers. It is part of the signalfd family, which also includes signalfd (the earlier interface). The signalfd4 variant adds an explicit parameter to control the size of the signal information payload returned to userspace.
The prototype is int signalfd4(int fd, const sigset_t *mask, int flags, size_t siginfo_size). If fd is -1,
Usage typically requires blocking the signals in the set with sigprocmask or pthread_sigmask before creating the
Notes: signalfd4 provides a mechanism to tailor the size of the returned signal information payload and coexists