I have a .py file running in the background, invoked with:
python file.py &
Now I try to stop it as using:
$ ps -fA | grep python
root 31032 1 0 14:41 ? 00:00:00 python home/file.py
$ kill -9 1
This does not work. I thought kill -9
was a sure fire way to shut down a process using its pid, but it seems weird that the pid for the .py file is 1 in the first place.
How do i stop this file?
kill 31032
– M. Becerra Mar 14 '17 at 14:07