Lockfile not removed after unclean shutdown
randomstring opened this issue · comments
Bryn Dole commented
The lockfile /home/pi/weasleyclockd/weasleyclock.pid.lock
is not deleted if the daemon is not shot down cleanly. For instance if the Raspberry Pi loses power.
Need to investigate the correct way to do this. Some clues:
https://unix.stackexchange.com/questions/256125/whats-the-best-way-to-remove-pid-files-before-starting-a-service
https://pagure.io/python-daemon/issue/4
Bryn Dole commented
The '/run/lock' directory is the proper place to put PID lock files. This directory id a tmpfs and is recreated at boot time, clearing the old lock files.