guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#41507] [PATCH Shepherd 2/2] shepherd: Use 'signalfd' when possible.


From: Mathieu Othacehe
Subject: [bug#41507] [PATCH Shepherd 2/2] shepherd: Use 'signalfd' when possible.
Date: Tue, 02 Jun 2020 09:00:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hey Ludo,

> 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.

Otherwise, this looks fine, thanks for taking care of that :)

Mathieu





reply via email to

[Prev in Thread] Current Thread [Next in Thread]