When debugging I often use killall
to kill a process. This is really a bad habit because there might be more processes running of the same name on the system.
Normally the process I want to kill is a descendant from the same parent (or grandparent) as killall
is started from. Often I want to kill a program started in the same terminal or a terminal in another tab (in Konsole).
Is there a way to tell killall
(or another killer) to limit the scope to processes started from this terminal or processes that are descendants from the same (grand)parent?
ps
selects processes at the terminal scope by default, which could then be piped toxargs kill
. – Haxiel Nov 22 '18 at 09:40