From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 2c79a8f 2/2: Use posix_spawn if possible. Date: Tue, 25 Jan 2022 14:22:34 +0200 Message-ID: <83r18whunp.fsf@gnu.org> References: <7CFD5E28-8266-4004-BF66-255146D72722@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6124"; mail-complaints-to="usenet@ciao.gmane.io" Cc: p.stephani2@gmail.com, alan@idiocy.org, mituharu@math.s.chiba-u.ac.jp, emacs-devel@gnu.org To: Saulius Menkevicius Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 25 13:36:30 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nCL3m-0001No-Cr for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Jan 2022 13:36:30 +0100 Original-Received: from localhost ([::1]:47964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nCL3k-0005rk-Oo for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Jan 2022 07:36:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCKqV-0000ER-0m for emacs-devel@gnu.org; Tue, 25 Jan 2022 07:22:47 -0500 Original-Received: from [2001:470:142:3::e] (port=32916 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCKqU-0003nq-1O; Tue, 25 Jan 2022 07:22:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=1wJctl0F3sAh2+DAK253YhYQls1MGBt0ia7zPxOZbOc=; b=ebilrb9tY39m qYr59tGJ9kWgW0PnsBEtObG0dKZxTNoE+UaQGvD+BGxAX5PP6yZT2uXrsYsxoqqOszFCHU7DaVH8+ uJzju+iZpM0rZzSRwgdNhkX/QIh3itYqh9ItjpjQqLGl9k5+cBDuj4ewS8YceCzhqMTncF6HiYqQh 29XfsBAibxAL46vgbn9Udq8ItpV3LKC8yGp2kXNnFAAqhpu9QwOqnoVrGmL6MwoRMnMvORnvffePq oKPlCRxxZdhl6w4Ne2SUx3TdU9OSpOcAt/RikfmWxv2JFdTOeoOmozRiuJt/BvulgpLW+1V8XYlRd yp6Sq3gg0tiIdRWUbewBWQ==; Original-Received: from [87.69.77.57] (port=4681 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCKqT-0004AX-E5; Tue, 25 Jan 2022 07:22:45 -0500 In-Reply-To: (message from Saulius Menkevicius on Tue, 25 Jan 2022 10:58:51 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:285362 Archived-At: > 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 > > 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?