user2054900
user2054900

Reputation: 341

(kill-emacs) not working

I've seen the discussion on how to kill the emacs daemon after killing the client. If you run emacs as a daemon, killing it's client doesn't also kill the daemon: the daemon just sits there still running. All/most solutions I've seen involve (kill-emacs). For example, I have this alias:

alias killemacs='emacsclient -e "(kill-emacs)"'

. . . and I'm pretty sure it used to work. But now it has no effect. Now I have to resort to kill -9 . Any thoughts as to the definitive way to kill a emacs daemon per command line?

Upvotes: 0

Views: 505

Answers (2)

Shubham Atkal
Shubham Atkal

Reputation: 26

use ps to get process id of emacs and then use kill -9 <pid>

Upvotes: -1

mkjasinski
mkjasinski

Reputation: 3088

Maybe that:

kill -9 `ps aux | grep emacs | grep -v grep | awk '{print $2}'`

Upvotes: 0

Related Questions