[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shepherd does not recycle zombie processes
From: |
Carlo Zancanaro |
Subject: |
Re: Shepherd does not recycle zombie processes |
Date: |
Mon, 07 Nov 2016 22:35:41 +1100 |
User-agent: |
mu4e 0.9.16; emacs 25.1.1 |
Hey Ludo!
On Mon, Nov 07 2016, Ludovic Courtès wrote
Could it be that you invoke the ‘daemonize’ action after
respawnable processes have been started? The manual has this
caveat (info "(shepherd) The root and unknown services"):
‘daemonize’
Fork and go into the background. This should be called
before respawnable services are started, as otherwise we
would not get the ‘SIGCHLD’ signals when they terminate.
Yeah, I saw that note in the documentation. I used to have
(action 'shepherd 'daemonize)
as the first line in ~/.config/shepherd/init.scm. Is there some
other way that I was supposed to do that?
With that line in place, Shepherd will leave behind a process
every time I stop/start a service.
I have attached an example init.scm that does this for me. If I
start:
shepherd -c init.scm
and then run:
herd stop sleep
herd start sleep
herd stop sleep
herd start sleep
herd stop sleep
then I will have three zombie sleep processes underneath my
Shepherd process. (If the service were respawnable then it also
would fail to restart the service.)
I assume this behaviour is wrong, but if I'm doing something wrong
then please let me know what it is.
Carlo
init.scm
Description: Binary data
signature.asc
Description: PGP signature
Re: Shepherd does not recycle zombie processes, Ludovic Courtès, 2016/11/06