I want to kill a process on a remote server with another user, who creted the process via python with the subprocess.Popen command. But there is something I must be doing wrong because nothing happens when I run:
subprocess.Popen(['sudo','kill','-9',str(pid)], stdout=subprocess.PIPE)
In terminal sudo kill -9 pid works fine.
sudopassword?os.system('sudo kill -9 pid')