mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-14 06:06:40 +00:00
properly write pid, create-time
This commit is contained in:
parent
6eebbda7c6
commit
930f4029f3
@ -94,9 +94,9 @@ def check_pid_process(pidfile):
|
||||
pidfile.remove()
|
||||
|
||||
# write our PID + start-time to the pid-file
|
||||
starttime = psutil.Process().create_time()
|
||||
proc = psutil.Process()
|
||||
with pidfile.open("w") as f:
|
||||
f.write("{} {}\n".format(pid, starttime).encode("utf8"))
|
||||
f.write("{} {}\n".format(proc.pid, proc.create_time()).encode("utf8"))
|
||||
except Timeout:
|
||||
raise ProcessInTheWay(
|
||||
"Another process is still locking {}".format(pidfile.path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user