alexmurray / emacs-snap

GNU Emacs in a snap
https://snapcraft.io/emacs
71 stars 13 forks source link

how do i get the emacs snap process to correctly remove itself when i close emacs? #43

Closed drewverlee closed 1 year ago

drewverlee commented 1 year ago

When I try to update my emacs snap I'm unexpectedly met with a warning that it can't be done because emacs has running:

sudo snap refresh emacs

[sudo] password for drewverlee: 
error: cannot refresh "emacs": snap "emacs" has running apps (emacs), pids:
       510680,510742,542637,542727,580098,580165

Here is a ps output:

 ps -aux | grep emacs

drewver+  510680  0.2  1.2 1728500 420144 ?      Sl   Aug28   3:12 /snap/emacs/1650/usr/bin/emacs
drewver+  542637  0.4  1.3 1698364 455456 ?      Sl   00:25   2:35 /snap/emacs/1650/usr/bin/emacs --resume-layouts
drewver+  580098  1.7  1.2 1733436 424288 ?      Sl   10:25   0:12 /snap/emacs/1650/usr/bin/emacs
drewver+  583219  0.0  0.0   9044  2444 pts/3    S+   10:37   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox emacs

Here is my emacs init file /config, please give all the advice you want on it :)

alexmurray commented 1 year ago

Hmm I wonder if spacemacs or your config does something with subprocesses? Although emacs normally should kill all subprocesses on exit https://www.gnu.org/software/emacs/manual/html_node/elisp/Query-Before-Exit.html

alexmurray commented 1 year ago

Closing this issue since no response. If you can still reproduce this, let me know and I can try looking into it again.