python-pidfile icon indicating copy to clipboard operation
python-pidfile copied to clipboard

not working on linux (raspberry pi) with nohup

Open aster94 opened this issue 5 years ago • 2 comments

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?

aster94 avatar Apr 09 '20 18:04 aster94

Please add your code sample.

mosquito avatar Apr 23 '20 17:04 mosquito

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"):

vascobarbosa avatar Mar 25 '23 16:03 vascobarbosa