[LEDE-DEV] a Procd alternative to respawn for a died daemon?

Jurgen Van Ham juvanham.tc at gmail.com
Fri Jul 1 00:14:27 PDT 2016


Dear all,

The current version of procd can respond to a failing daemon by
respawning it. This works for daemons that no (or not many) daemons
rely on.

Is there an elegant way to cause a restart after critical service
dies. With critical I mean that a mere restart would require too many
actions from other daemons.

I can imagine a work around by replacing the "procd_set_param command
XXXX" in an init file by "procd_set_param command
/bin/critical_XXXX.sh" and using a file /bin/critical_XXXX.sh that
first starts XXXX.sh and when it returns triggers a reboot. This could
lead to a reboot during a intended shutdown.

Does it make sense to support an extra procd_set_param (e.g.,
'reboot') that explicitly triggers a reboot when its 'command' dies?
This reboot could either have a time argument or a script that is
executed after the daemon fails.

I don't see much reason for executing a script, but maybe this makes
it possible to support more advanced recovery scenarios instead of
restarting the device.

Do other developers have other (better) ideas how to deal with a dying
daemon, that is more complex to restart because it requires actions
from other daemon to deal with its restart.

regards,



More information about the Lede-dev mailing list