Hello Mathieu! Mathieu Othacehe skribis: >> + (begin >> + ;; Unblock any signals that might have been blocked by the parent >> + ;; process. >> + (unblock-signals (list SIGCHLD SIGINT SIGHUP SIGTERM)) > > This made me realize that we may want to disable/reset SIGINT and > SIGHUP, in the same way that we do for SIGTERM? This is not related to > your patch anyway. I looked into this and came up with the patches below. What it does is unconditionally block these four signals before forking. Then the child process installs SIG_DFL handlers for them and unblocks them. 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? (I also thought about using ‘call-with-blocked-asyncs’ instead of ‘with-blocked-signals’. That would have prevented signal handling at the Scheme level from happening, but the unhandled signals in the child would be lost.) If it works for you, I’ll do some more testing, and then hopefully we can release 0.8.1 in the coming days! Ludo’.