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

From: Mathieu Othacehe <[email-masked]>
Date: Tue, 02 Jun 2020 09:00:20 +0200

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