From 7937aadec4389bfe96d3d80cfad50312efa2e5d9 Mon Sep 17 00:00:00 2001 From: jwansek Date: Tue, 8 Jan 2019 20:29:22 +0000 Subject: fixed a but with dates and fixed memory leak --- runprog.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'runprog.py') diff --git a/runprog.py b/runprog.py index a564678..4568c59 100644 --- a/runprog.py +++ b/runprog.py @@ -11,13 +11,13 @@ while True: sleep(60 * 60 * 2) - #print("closing...") - #file = open("pid.txt", "r") - #pid = file.readlines()[0] - #file.close() + print("closing...") + file = open("pid.txt", "r") + pid = file.readlines()[0] + file.close() - #subprocess.run(["kill", pid]) + subprocess.run(["kill", pid]) thread.terminate() - #print("killed ", pid) + print("killed ", pid) -- cgit v1.2.3