When I want to kill a process using the pid in linux, its subprocess still existes. I hope to kill all process using one command.
About linux : Is-there-a-simple-method-to-kill-a-process-and-all-subprocess-in-linux-system
Question Detail
Question Answer
Suggesting command pkill -p PID pattern
.
See more documentation here.
Check out process groups:
https://en.wikipedia.org/wiki/Process_group
Assuming you want to do this from a shell?
If you do a kill
and make the top process negative it does a killpg
under the covers and sends the signal to all the processes in the group.