kill -TERM -PID
is supposed to kill PID and all its child processes.
but this doesn't work on openSUSE, it always tell me that no such process -PID no matter what PID i use.
So if the negative PID option is not supported by this particular version of kill, what is the best way to kill a group of processes?
background:
I have a shell script running. inside the script, I use wget to download things. So the script is the parent process, wget is the child process. I want to kill them both using kill -TERM -PID_OF_SCRIPT
pid
arg actually refers to the process group ID.PID
. Useps -j
to see the process group ids.