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
pkill -p PID pattern .
See more documentation here.
Check out process groups:
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.