You call os.kill on the process pid.
os.kill(process.pid, signal.SIGKILL)
You’re OK because you’re on on Linux. Windows users are out of luck.
More Related Contents:
- Actual meaning of ‘shell=True’ in subprocess
- How do I pass a string into subprocess.Popen (using the stdin argument)?
- Python subprocess readlines() hangs
- Blocking and Non Blocking subprocess calls
- Interactive input/output using Python
- Run command and get its stdout, stderr separately in near real time like in a terminal
- Launch a completely independent process
- Multiple inputs and outputs in python subprocess communicate
- Python C program subprocess hangs at “for line in iter”
- Popen with conflicting executable/path
- subprocess: deleting child processes in Windows
- How do I get ‘real-time’ information back from a subprocess.Popen in python (2.5)
- Use subprocess to send a password
- How to write to stdout AND to log file simultaneously with Popen?
- link several Popen commands with pipes
- Kill a running subprocess call
- How do I run another script in Python without waiting for it to finish? [duplicate]
- How to replicate tee behavior in Python when using subprocess?
- Can you make a python subprocess output stdout and stderr as usual, but also capture the output as a string? [duplicate]
- Ensuring subprocesses are dead on exiting Python program
- real time subprocess.Popen via stdout and PIPE
- Subprocess timeout failure
- When to use Shell=True for Python subprocess module [duplicate]
- ‘^’ is ignored by Python – how to escape ‘^’ character in Popen Windows?
- Break the function after certain time
- What’s the difference between subprocess Popen and call (how can I use them)?
- Python subprocess in parallel
- Passing variables to a subprocess call [duplicate]
- Subprocess check_output returned non-zero exit status 1
- Waiting for external launched process finish