Commit 131e588d authored by mago960806's avatar mago960806 Committed by 老广

is_running()里的打开pid文件的操作已经在get_pid()中执行过了,不需要再次执行 (#2335)

parent 4bf0dfcf
...@@ -108,8 +108,7 @@ def is_running(s, unlink=True): ...@@ -108,8 +108,7 @@ def is_running(s, unlink=True):
pid_file = get_pid_file_path(s) pid_file = get_pid_file_path(s)
if os.path.isfile(pid_file): if os.path.isfile(pid_file):
with open(pid_file, 'r') as f: pid = get_pid(s)
pid = get_pid(s)
if check_pid(pid): if check_pid(pid):
return True return True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment