GNU bug report logs -
#41507
[PATCH Shepherd 0/2] Use 'signalfd' on GNU/Linux
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Sun, 24 May 2020 14:28:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #46 received at 41507 <at> debbugs.gnu.org (full text, mbox):
Hi,
Mathieu Othacehe <othacehe <at> gnu.org> skribis:
>> That way, the child is guaranteed to never execute the original
>> handlers, and neither the parent nor the child misses any of these
>> signals (previously, the temporary (sigaction SIGTERM SIG_DFL)
>> introduced a window during which shepherd could be killed by a SIGTERM
>> instead of handling it gracefully.)
>>
>> WDYT?
>
> Yes, this is indeed much better this way!
>
>> +(define %precious-signals
>> + ;; Signals that the shepherd process handles.
>> + (list SIGCHLD SIGINT SIGHUP SIGTERM))
>
> We could maybe factorize this list with the one in "signal-port" in the
> "main" procedure. This way if we ever add an extra signal, we do not
> forget to add it to blocked signals list.
Yes, good idea.
I pushed the series with a followup commit to do that:
38e3589 shepherd: Factorize list of handled signals.
576ac61 service: 'fork+exec-command' blocks handled signals before forking.
ec36311 system: Add 'with-blocked-signals'.
bc74b5e system: 'sigprocmask' returns the previous set of blocked signals.
Let’s see if I can tag a release tomorrow…
Thanks for your feedback!
Ludo’.
This bug report was last modified 4 years and 350 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.