How to kill a nohup process?

polerto picture polerto · Nov 4, 2011 · Viewed 89k times · Source

I executed the following command

$ nohup ./tests.run.pl 0 &

now when I try to kill it (and the executions that are started from this script) using

$ kill -0 <process_id>

it does not work. How can I kill a nohupped process and the processes that runs via the nohupped script?

Thanks

Answer

Mat picture Mat · Nov 4, 2011

kill -0 does not kill the process. It just checks if you could send a signal to it.

Simply kill pid, and if that doesn't work, try kill -9 pid.