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.
CodePudding user response:
Suggesting command pkill -p PID pattern
.
See more documentation here.
CodePudding user response:
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.