refs #1642 - Modify Cancel Transfers scripts

pull/24/head
Gerardo GIl Elizeire 2025-03-05 15:32:55 +01:00
parent 43bc2782e6
commit f5cf0ce0ec
3 changed files with 4 additions and 4 deletions

View File

@ -27,7 +27,7 @@ def kill_seeder():
que corresponde al seeder P2P.
"""
try:
subprocess.run(f"pkill btlaunchmany".split(), check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
subprocess.run(f"sudo pkill -9 btlaunchmany".split(), check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print("Process btlaunchmany.bittornado finalized")
except Exception as error_description:
print(f"No btlaunchmany.bittornado process running? Returned error: {error_description}")
@ -39,7 +39,7 @@ def kill_tracker():
que corresponde al tracker P2P.
"""
try:
subprocess.run(f"pkill bttrack".split(), check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
subprocess.run(f"sudo pkill -9 bttrack".split(), check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print("Process bttrack finalized")
except Exception as error_description:
print(f"No bttrack process running? Returned error: {error_description}")

View File

@ -115,7 +115,7 @@ def kill_udp_sender(pid):
"""
try:
# Finalizamos el proceso asociado al pid especificado como parámetro, e imprimimos el return code:
result = subprocess.run(f"kill {pid}".split(), check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
result = subprocess.run(f"sudo kill -9 {pid}".split(), check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print(f"ReturnCode: {result.returncode}")
# Si se ha producido una excepción, imprimimos el error y salimos del script:
except Exception as error_description:

View File

@ -115,7 +115,7 @@ def kill_uftp(pid):
"""
try:
# Finalizamos el proceso asociado al pid especificado como parámetro, e imprimimos el return code:
result = subprocess.run(f"kill {pid}".split(), check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
result = subprocess.run(f"sudo kill -9 {pid}".split(), check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print(f"ReturnCode: {result.returncode}")
# Si se ha producido una excepción, imprimimos el error y salimos del script:
except Exception as error_description: