[LEDE-DEV] Procd instance pidfiles remain after daemon dies unexpectedly

Jurgen Van Ham juvanham.tc at gmail.com
Thu Jun 30 23:45:22 PDT 2016


Dear all,

Procd supports instance_writepid and instance_removepid in the file instance.c.
The removepid is called when stopping a daemon or restarting it.
However, when a daemon
dies and it is not configured to respawn the pidfile is not removed.


When other daemon watch the pidfile because they rely on the daemon
they cannot rely to stop when the pidfile disappears.  This other
daemon cannot just continue after procd would respawn the died daemon.
Before restarting the procd managed daemon, the depending daemons need
to stop.

Would a fix in the function instance_exit be the right solution to
remove the pid after dying without a configured respawn?
Is there a reason to keep a pidfile after a daemon terminates without
any procd request.

regards,



More information about the Lede-dev mailing list