DEBUG pid in kill_process() arrive as string. so convert to int
This commit is contained in:
parent
7af207253a
commit
05d600da71
@ -116,10 +116,10 @@ def kill_process(pid):
|
||||
Kill single process.
|
||||
|
||||
Args:
|
||||
pid (): Process ID of process to kill # TODO: check if pid is int
|
||||
pid (str): Process ID of process to kill
|
||||
"""
|
||||
try:
|
||||
os.kill(pid, signal.SIGKILL)
|
||||
os.kill(str(pid), signal.SIGKILL) # pid apparently arrives as string
|
||||
except ProcessLookupError:
|
||||
print("[-] Process {} not found.".format(pid))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user