James Berry <jberry@macports.org> writes:
For those cases where startupitem.executable cannot be used, daemondo also supports the startupitem.pidfile commands that allow the process' pidfile to be monitored: daemondo will read the pidfile and watch for the death of that process.
So daemondo, and thus launchd, will be aware of the daemon process death (and be able to restart the daemon process) only under two circumstances:
(1) startupitem.executable was supplied (thus daemondo starts the process) (2) startupitem.pidfile was supplied (thus daemondo reads the process id)
Under all other circumstances, daemondo will not know that the daemon process has died, and will not exit when the process does die, and thus launchd won't restart the process since it doesn't know it died. Put another way, if daemondo can know the process has died, then launchd will know too, but not otherwise.
These statements seem incompatible with ....
The pidfile keyword is likely used only if executable is not.
This one. Looks to me like startupitem.pidfile must be set for a deamon to be tracked whether it is executable startupitem or not. And the man page says startupitem.pidfile is "particularly useful" for startupitem.executable. Can you explain this? Mark