mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-05 20:30:03 +02:00
removed -9 to kill with cleanup
This commit is contained in:
parent
9f4298ac15
commit
eb3d51d20c
@ -33,10 +33,9 @@ def killProcess(name):
|
|||||||
Log(Fore.GREEN, f"Killing '{name}' processes with PIDs: {', '.join(pids)}")
|
Log(Fore.GREEN, f"Killing '{name}' processes with PIDs: {', '.join(pids)}")
|
||||||
for pid in pids:
|
for pid in pids:
|
||||||
try:
|
try:
|
||||||
cmd = f"kill -9 {pid}"
|
p = subprocess.run(['kill', pid])
|
||||||
p = subprocess.run(['kill', '-9', pid])
|
|
||||||
if p.returncode != 0 and bool(checkIfProcessRunning(name)):
|
if p.returncode != 0 and bool(checkIfProcessRunning(name)):
|
||||||
raise RuntimeException(f"'kill -9' failed for {name} with pid {pid}")
|
raise RuntimeException(f"Could not kill {name} with pid {pid}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
Log(Fore.RED, f"Failed to kill process {name} pid:{pid}. Exception occured: [code:{e}, msg:{e.stderr}]")
|
Log(Fore.RED, f"Failed to kill process {name} pid:{pid}. Exception occured: [code:{e}, msg:{e.stderr}]")
|
||||||
raise
|
raise
|
||||||
|
Loading…
x
Reference in New Issue
Block a user