python-pidfile
python-pidfile copied to clipboard
not working on linux (raspberry pi) with nohup
Hello,
I tried on raspberry pi 3B+ and it didn't work. Even if I can see the process the pid file is not created. Could the problem be created by the nohup command?
Please add your code sample.
try:
with pidfile.PIDFile("/tmp/doors.pid"):
logging.info("Started")
except pidfile.AlreadyRunningError:
logging.info("Already Running")
sys.exit(0)
~~this doesnt work~~
edit: Sorry my bad., this works all the code have to be after this : with pidfile.PIDFile("/tmp/doors.pid"):