:: Re: [DNG] Good thing we don't use s…
Top Page
Delete this message
Reply to this message
Author: Didier Kryn
Date:  
To: dng
Subject: Re: [DNG] Good thing we don't use systemd
Le 07/04/2026 à 16:01, Chris Angelico via Dng a écrit :
> On Tue, 7 Apr 2026 at 23:43, Didier Kryn <kryn@???> wrote:
>>       You're right, the kernel implementation calls dequeue_signal() just
>> when the application reads from the file descriptor, which means
>> signalfd() is just a file-style API, but not a queue where the signals
>> would be stored. Too bad! It is nevertheless convenient to serialize the
>> signals, process them in the normal context of the application instead
>> of a signal handler, and wait for them at the same wait point as
>> possible other asynchronous events.
>>
> That's exactly how I usually use it - adding the signals to the set of
> file descriptors being monitored. So if I set that fd into an epoll
> group, when is dequeue_signal() called, and does it improve
> reliability?


    Don't know if it improves readability. The main advantage is what
you say, and the second is that the processing of the signal is done in
the normal context of the application, in which all functions can be called.

--     Didier