Subject: Re: bug#24326: 25.1; Daemon doesn't exit on Windows if kill-emacs-hook asks a question
From: Eli Zaretskii <[email-masked]>
To: [email-masked]
Date: Mon, 12 Sep 2016 21:27:40 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Mon, 29 Aug 2016 17:38:11 +0300
> From: Eli Zaretskii <[email-masked]>
> 
> 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?

No further comments, so I went ahead and pushed this to the master
branch, and I'm marking this bug done.