linux - Python daemon doesnt spawn at times -
i have daemon in python spawn using daemonrunner api(a pid file , lock file created). pid file , lock file deleted when daemon stopped.
the start/stop works fine except daemon doesn't start. need delete entire folder had pid file up. how debug this? there auto-generated file name host.mainthread-pid. significance of this?
here's class start/stop daemon
class myrunner(daemonrunner): def __init__(self,appl): self.appl = appl daemonrunner.__init__(self,appl) def start(self): // check if pid file exists.. retval =daemonrunner.start(self) return retval def stop(self): return daemonrunner.stop(self)
strace looks similar both successful , unsuccessful usecases.
Comments
Post a Comment