When the daemon dies not gracefully, and the pid_file remains, the daemon cannot run again, as it founds the old pid_file.
I solved this problem changing the write_pid function in daemon.c.
Not it tries to lock the pid_file (in case it exists), and if it's not locked, it removes the old pid_file.
When the daemon dies not gracefully, and the pid_file remains, the daemon cannot run again, as it founds the old pid_file. I solved this problem changing the write_pid function in daemon.c. Not it tries to lock the pid_file (in case it exists), and if it's not locked, it removes the old pid_file.
Attached you can find the patch to daemon.c hawkeye_lockfile_fix.patch.txt