MCPcopy
hub / github.com/pyload/pyload / checkPidFile

Method checkPidFile

pyLoadCore.py:208–218  ·  view source on GitHub ↗

return pid as int or 0

(self)

Source from the content-addressed store, hash-verified

206 os.remove(self.pidfile)
207
208 def checkPidFile(self):
209 """ return pid as int or 0"""
210 if os.path.isfile(self.pidfile):
211 f = open(self.pidfile, "rb")
212 pid = f.read().strip()
213 f.close()
214 if pid:
215 pid = int(pid)
216 return pid
217
218 return 0
219
220 def isAlreadyRunning(self):
221 pid = self.checkPidFile()

Callers 2

deletePidFileMethod · 0.95
isAlreadyRunningMethod · 0.95

Calls 2

readMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected