unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Aaron Zeng <azeng@janestreet.com>,
	Daniel Pettersson <daniel@dpettersson.net>
Cc: 70522@debbugs.gnu.org, app-emacs-dev@janestreet.com,
	"João Távora" <joaotavora@gmail.com>
Subject: bug#70522: 29.2.50; eglot-shutdown sends SIGKILL before LSP server can exit gracefully
Date: Tue, 23 Apr 2024 08:51:46 +0300	[thread overview]
Message-ID: <86wmoo4oel.fsf@gnu.org> (raw)
In-Reply-To: <CAB7SQMGS4KuAEx4RH6452c0yrOoQAQCxW=QTvcKgyyB0UvCg9w@mail.gmail.com> (message from Aaron Zeng on Mon, 22 Apr 2024 17:39:32 -0400)

> Cc: app-emacs-dev <app-emacs-dev@janestreet.com>
> From: Aaron Zeng <azeng@janestreet.com>
> Date: Mon, 22 Apr 2024 17:39:32 -0400
> 
> 1. emacs -Q
> 2. M-x eglot in some file (I tested with OCaml-LSP and another language
> server, the latter is internal to my site)
> 3. M-x eglot-shutdown
> 
> This messages:
> 
> [jsonrpc] Server exited with status 9
> 
> Which is a little confusing.  One would expect the language server to
> exit with status 0, and not end up with "killed" in the events buffer,
> if the server exited successfully upon user request.
> 
> I installed the following patch locally at my site, and it seems to fix
> the issue (now the server exits with status 0).  I think it also better
> matches the docstring of `jsonrpc-shutdown'.
> 
> diff --git a/jsonrpc.el b/jsonrpc.el
> --- a/jsonrpc.el
> +++ b/jsonrpc.el
> @@ -598,8 +598,8 @@ With optional CLEANUP, kill any associat
>         while (not (process-get proc 'jsonrpc-sentinel-cleanup-started))
>         unless (zerop i) do
>         (jsonrpc--warn "Sentinel for %s still hasn't run, deleting it!" proc)
> +       (delete-process proc)
>         do
> -       (delete-process proc)
>         (accept-process-output nil 0.1))
>      (when cleanup
>        (kill-buffer (process-buffer (jsonrpc--process conn)))

Thanks.

Daniel, could you please look into this issue?





  reply	other threads:[~2024-04-23  5:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 21:39 bug#70522: 29.2.50; eglot-shutdown sends SIGKILL before LSP server can exit gracefully Aaron Zeng
2024-04-23  5:51 ` Eli Zaretskii [this message]
2024-04-23 16:58   ` Daniel Pettersson
2024-04-27  9:20     ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=86wmoo4oel.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=70522@debbugs.gnu.org \
    --cc=app-emacs-dev@janestreet.com \
    --cc=azeng@janestreet.com \
    --cc=daniel@dpettersson.net \
    --cc=joaotavora@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).