Subject: Re: [bug#41507] [PATCH Shepherd 0/2] Use 'signalfd' on GNU/Linux

From: Ludovic Courtès <[email-masked]>
Date: Mon, 25 May 2020 09:37:18 +0200

Hi Jelle,

Jelle Licht <[email-masked]> skribis:

> I am extremely happy to see that you got this to work; I bashed my head
> against a wall getting the signal-handling thread to block the right
> signals. This does seem like something that should be in guile proper
> rather than shepherd though.

Oh right, you had first-hand experience fiddling with this!

Yeah ideally Guile would provide some ‘signalfd’ support.  I’m not sure
exactly how that should work.  It’s easier to have ad-hoc support in the
Shepherd in the meantime.

> As I read it, you need to set up a signalfd handlers for specific
> signals before ever calling `sigaction'. Does this not have an impact on
> being able to do some forms of REPL-driven development with shepherd?

It depends, I don’t test things like SIGCHLD handling from the REPL
anyway.  :-)

> Perhaps it makes sense to document this gotcha (and some of its
> implications) in a location other than an inline comment in
> `maybe-signal-port'.

Where would you document that?  Currently, one gets a warning if signals
cannot be properly blocked.

Thanks for your feedback!

Ludo’.