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: Sat, 12 Feb 2022 10:44:21 +0200

Correct, I meant ":connection-type pipe“ when I referred to lsp-mode. My mistake. Curiously setting :connect-type to ’pty does not fix my issues on macOS+emacs-28 for me. I might be doing something wrong though.. Applying Robert’s patch does fix it on emacs-28 too.

And I was mistaken about /bin/bash reseting signal mask, ksh does it though.. https://unix.stackexchange.com/questions/123768/calling-sigprocmask-from-bash.

So my workarounds to fix sigmask are as follows:
- on linux, I will wrap invocation of server process with „/usr/bin/env --default-signal“
- on macos, I will wrap invocation of server process with „/bin/ksh -c“
- .. not sure what is needed on *BSDs, probably the same thing as on macOS if they have /bin/ksh in default installation?

Are there any chances of getting this patch to fix signal mask to default after posix_spawn from Robert getting merged to master and/or emacs-28?

-Saulius


Am 2022-02-09 um 10:48 schrieb Robert Pluim <rpluim@gmail.com>:

On Tue, 8 Feb 2022 23:09:20 +0200, Saulius Menkevicius <sauliusmenkevicius@fastmail.com> said:

   Saulius> Robert you are correct about ``:connection-type''. In particular
   Saulius> lsp-mode specifies ``:connection-type pty'' here:

':connection-type pipe', you mean. Does it still work if you use
'pty'?

   Saulius> - https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-mode.el#L6932
   Saulius> <https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-mode.el#L6932>

   Saulius> As a workaround fsharp/csharp language servers can use shell wrapper
   Saulius> for launching the server binaries, as "#!/bin/bash" will apparently
   Saulius> normalize signal mask before launching sub-subprocess and things work
   Saulius> alright from thereon.

Thatʼs to be expected. bash is a caring parent :-)

   Saulius> This is not as nice as having things just working before this change
   Saulius> to `make-process`, but at least we have some way to work around this
   Saulius> issue..

OK. In that case Iʼll put it only in master.

Robert
--


reply via email to

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