emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 2c79a8f 2/2: Use posix_spawn if possible.


From: Saulius Menkevicius
Subject: Re: master 2c79a8f 2/2: Use posix_spawn if possible.
Date: Tue, 25 Jan 2022 14:25:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

I certainly cannot answer that, it probably does some kind of sniffing on FDs and changes behaviour.

To actually figure that out I would need to build a minimal test fixture for this bug/issue and submit to dotnet/runtime repo on github for them to check and/or fix it.

-Saulius

Am 25.01.22 um 14:22 schrieb Eli Zaretskii:
Date: Tue, 25 Jan 2022 10:58:51 +0200
Cc: p.stephani2@gmail.com, alan@idiocy.org, mituharu@math.s.chiba-u.ac.jp
From: Saulius Menkevicius <sauliusmenkevicius@fastmail.com>

Sorry I did not mention the platform, this happens on Linux/x64 and has
been reported by multiple persons:

- https://github.com/razzmatazz/csharp-language-server/issues/12


The issue has been noticed when dotnet-based LSP servers are used with
emacs/lsp-mode, -- in particular lsp-mode starts the server using
`make-process` and then communicates over stdio. Link to the code that
launches the server:

- https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-mode.el#L6925


We have csharp-ls and fsac servers launched with the same mechanism as
are for other languages -- which are working ok with posix_spawn
enabled. It only breaks for those before-mentioned LSP servers that are
implemented on top of dotnet and use dotnet runtime (same thing as JVM,
but for C#/F#/CLR languages).

Now it appears, that switch to posix_spawn broke communication over
stdio to those dotnet-based LSP servers for some technical reason, -- I
didn't investigate yet why, because it is a bit over my head. I *think*
there is an interplay between posix_spawn-based process launch
implementation in emacs and dotnet runtime stdio abstractions/platform
layer -- because otherwise other language servers work with that commit
that enables posix_spawn, like those based on JVM too.
What is special about dotnet's runtime stdio usage?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]