diff options
| author | Eli Zaretskii | 2016-09-12 21:25:09 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-09-12 21:25:09 +0300 |
| commit | 2675c79db5745d55d43b78019b1e6a4f84b168fa (patch) | |
| tree | 5dff547e5a5abacec46ead3752dd60a1df20ffd6 | |
| parent | 6d6d9cd607601f41501b8f64230150ae26b8d500 (diff) | |
| download | emacs-2675c79db5745d55d43b78019b1e6a4f84b168fa.tar.gz emacs-2675c79db5745d55d43b78019b1e6a4f84b168fa.zip | |
Fix daemon shutdown when emacs-kill-hooks ask questions
* lisp/server.el (server-start): Put the server's kill-emacs-hook
last, to allow other hooks to have a frame to interact with the
user. (Bug#24326)
| -rw-r--r-- | lisp/server.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/server.el b/lisp/server.el index 53009849e25..85d51c8ba07 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -648,7 +648,12 @@ server or call `\\[server-force-delete]' to forcibly disconnect it.")) | |||
| 648 | (add-hook 'delete-frame-functions 'server-handle-delete-frame) | 648 | (add-hook 'delete-frame-functions 'server-handle-delete-frame) |
| 649 | (add-hook 'kill-emacs-query-functions | 649 | (add-hook 'kill-emacs-query-functions |
| 650 | 'server-kill-emacs-query-function) | 650 | 'server-kill-emacs-query-function) |
| 651 | (add-hook 'kill-emacs-hook 'server-force-stop) ;Cleanup upon exit. | 651 | ;; We put server's kill-emacs-hook after the others, so that |
| 652 | ;; frames are not deleted too early, because doing that | ||
| 653 | ;; would severely degrade our abilities to communicate with | ||
| 654 | ;; the user, while some hooks may wish to ask the user | ||
| 655 | ;; questions (e.g., desktop-kill). | ||
| 656 | (add-hook 'kill-emacs-hook 'server-force-stop t) ;Cleanup upon exit. | ||
| 652 | (setq server-process | 657 | (setq server-process |
| 653 | (apply #'make-network-process | 658 | (apply #'make-network-process |
| 654 | :name server-name | 659 | :name server-name |