Hi, Ludovic Courtès skribis: > 1. In the best case, shepherd (as of 0.9.1) is stuck while ‘system*’ > is in ‘waitpid’ waiting for child process completion (“stuck” as > in: doesn’t do anything, not even answering ‘herd’ requests or > inetd connections.) > > 2. I don’t think that can happen with ‘system*’ (because it’s in C), > but generally speaking, there’s a possibility that shepherd’s event > loop will handle child process termination before some other > user-made ‘waitpid’ call does. > > Anyway, that’s a bad situation. > > So I can think of several ways to address it: > > 1. Change the nginx service ‘stop’ method to just > (make-kill-destructor), which should work just as well as invoking > “nginx -s stop”. > > 2. Have Shepherd provide a replacement for ‘system*’. These fresh Shepherd commits install a non-blocking ‘system*’ replacement: 975b0aa service: Provide a non-blocking replacement of 'system*'. 039c7a8 service: Spawn a fiber responsible for process monitoring. We’ll have to do more testing and probably go for a 0.9.3 release soon. Protip: you can test the latest shepherd with: --8<---------------cut here---------------start------------->8--- (operating-system ;; … (essential-services (modify-services (operating-system-default-essential-services this-operating-system) (shepherd-root-service-type config => (shepherd-configuration (shepherd (package (inherit shepherd-0.9) (version "0.9.3pre") (source (git-checkout (url "https://git.savannah.gnu.org/git/shepherd.git"))) (native-inputs (modify-inputs (package-native-inputs shepherd-0.9) (append autoconf automake help2man texinfo gnu-gettext)))))))))) --8<---------------cut here---------------end--------------->8--- Full example attached. Ludo’.