I have an emacs process running, but killall -9 won’t kill it.
Actually, killall -9 won’t kill any other process, either.
I’m new to Nixos, so I’m trying to understand;)
#ps -ef|grep -i emacs
luser 252643 252633 0 Sep19 pts/7 00:00:56 emacs -nw
luser 324603 308116 0 11:04 pts/4 00:00:00 grep -i emacs
#killall -9 emacs
emacs: no process found
I know I can kill the process directly, but I want to understand why killall doesn’t seem to have any effect.
emacs is probably wrapped, and there happens some ARG0 rewriting down the road. It might be that
killall does not use the original command line, but instead the actual ARG0 of the process to decide whether or not it should kill something.
It has been mentioned in the inofficial discord quite often, that
pkill is a working alternative.
Reading killall man page, it seems limited in the length of the command name, as binaries run from the nix store are prefixed by their path, no wonder killall doesn’t work
pkill will work fine for you