removed -9 to kill with cleanup
Some checks failed
Build on RHEL9 / build (push) Successful in 4m4s
Build on RHEL8 / build (push) Failing after 4m46s

This commit is contained in:
maliakal_d 2025-05-02 15:40:10 +02:00
parent 9f4298ac15
commit eb3d51d20c

View File

@ -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