mirror of
https://github.com/titanscouting/tra-superscript.git
synced 2025-02-07 04:15:46 +00:00
fixed delay in daemon stopping
Former-commit-id: 1d9fa990582c214f3f40d1a10e97accfc38e3468
This commit is contained in:
parent
3a068654ed
commit
30641e43d8
@ -293,9 +293,11 @@ def stop(pid_path):
|
|||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
while True:
|
||||||
os.kill(pid, SIGTERM)
|
os.kill(pid, SIGTERM)
|
||||||
return
|
time.sleep(0.01)
|
||||||
except OSError as err:
|
except OSError as err:
|
||||||
|
err = str(err)
|
||||||
if err.find("No such process") > 0:
|
if err.find("No such process") > 0:
|
||||||
if os.path.exists(pid_path):
|
if os.path.exists(pid_path):
|
||||||
os.remove(pid_path)
|
os.remove(pid_path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user