Use of daemon function to start process does not play well with non empty pid files
If the factory/frontend process dies for whatever reason and a non empty PID file is left around, daemon function does not like it and prevents the process to start. This prevents factory/frontend processes from graceful pidfile handling. Maybe using --force to the daemon function is required to get around this issue.
#1 Updated by Marco Mambelli almost 4 years ago
daemon is a function in /etc/init.d/functions to start daemons. There is outdated documentation in /usr/share/doc/initscripts-9.03.53/sysvinitfiles. I did not find any other documentation on the system or on the web.
Checking the source code:
- --pidfile: check this file instea of the default pidfile
- daemon is only checking if the file exists and has content, not creating or removing the pid file
- --force continue starting the service also if the pidfile is there
Changes are in v3/15483