Author: Rainer Weikusat Date: To: dng Subject: Re: [DNG] Good thing we don't use systemd
aitor <aitor@???> writes: > On 4/6/26 16:13, Didier Kryn wrote:
>> With signalfd(), the kernel queues the signals into a pseudofile
>> descriptor
>
> It's worth to say that the pseudofile descriptor is linked to the process performing the read() operation,
> not always the one that created it. For example, if a process opens a signalfd and then forks a child,
> the child inherits the descriptor. However, when the child reads from that, it will receive the signals
> intended for the child, not for the parent.
Obviously. Signalfd is just another way to receive signals generated for
a process synchronously, specifically, one which can be used in event
loops built around select/ poll/ epoll/ $younameit. A read operation on
a signalfd file descriptor tries to dequeue (part of the name of the
kernel function for this) a signal that's pending for the process doing
the read in the exact same way all other mechanism also providing this
(eg, sigwait) do.