all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: 24326@debbugs.gnu.org
Subject: bug#24326: 25.1; Daemon doesn't exit on Windows if kill-emacs-hook asks a question
Date: Mon, 29 Aug 2016 17:38:11 +0300	[thread overview]
Message-ID: <83mvjvbpyk.fsf@gnu.org> (raw)
In-Reply-To: <83shtobthc.fsf@gnu.org> (message from Eli Zaretskii on Sun, 28 Aug 2016 22:09:51 +0300)

> Date: Sun, 28 Aug 2016 22:09:51 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> 
> Not sure how to solve this.  One possibility would be to disable the
> "Save desktop?" question in this case, on MS-Windows only, and instead
> act as if the answer is NO.  desktop-kill is called from several
> places, so if we go this way, we will have to devise a way of figuring
> out that the question cannot be answered.

Actually, here's a simple solution:

diff --git a/lisp/server.el b/lisp/server.el
index 5300984..d34546d 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -648,7 +648,7 @@ server-start
 	  (add-hook 'delete-frame-functions 'server-handle-delete-frame)
 	  (add-hook 'kill-emacs-query-functions
                     'server-kill-emacs-query-function)
-	  (add-hook 'kill-emacs-hook 'server-force-stop) ;Cleanup upon exit.
+	  (add-hook 'kill-emacs-hook 'server-force-stop t) ;Cleanup upon exit.
 	  (setq server-process
 		(apply #'make-network-process
 		       :name server-name

I wonder if it ever makes sense for server.el to have its
kill-emacs-hook before any others.  server-force-stop deletes all the
client frames, so if there are no other frames, our capabilities to
communicate with the user are thereafter seriously degraded.

If the above is deemed too bold, we could do that only in the daemon,
using daemonp for the test.

Comments?





  reply	other threads:[~2016-08-29 14:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-28 19:09 bug#24326: 25.1; Daemon doesn't exit on Windows if kill-emacs-hook asks a question Eli Zaretskii
2016-08-29 14:38 ` Eli Zaretskii [this message]
2016-09-12 18:27   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83mvjvbpyk.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=24326@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.