If you're on linux, rofi[1] is a very versatile fuzzy-search graphical application. One of the typical ways to use it is to invoke it in script mode (see man rofi-script) with a shell script, where if called without arguments it invokes rofi against that script's stdout, and if called with arguments it runs a different command with that argument. This is nice because I don't have to switch to/open a new terminal or emacs, it's bound to a key I can invoke from anywhere in the graphical session. The kill process script is pretty simple (I filter out the path names from the nix store since I'm using nix)
if [[ -z "$@" ]]; then
echo -e "\0prompt\x1fKill Process"
ps -ax | awk '{$2 = "" ; $3 = ""; $4 = ""; print $0}' | tail -n +2 | sed 's/\/nix\/store\/[^\/]*//'
else
kill $1
fi
I use aggressive-indent-mode with lsp and often clangd gives an error about "something something non added document" and emacs hangs. The only way to unblock it is to kill clangd from a shell.
Quite annoying, but haven't spent much time debugging it
Whether that matters depends on your use. Usually when I want to kill a process it's a program I'm working on and unrelated to emacs itself. This will be very useful for that and I can still always fire up an external terminal to kill things in the rare case where emacs itself is stuck waiting foe something and I can't C-g it. (Actually, since I use emacs EXWM as the window manager, in that situation I would Ctrl-Alt-Fkey to another tty and kill emacs if SIGUSR2 doesn't wake it up - a very rare situation indeed.)