neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 996fc2256bafabeb8f5806d70d531311a34d29f9
parent 8b67f37798d90da957801be791da9425fb6fe741
Author: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
Date:   Thu, 11 Aug 2022 17:04:55 +0200

fix(lsp): avoid pipe leaks if lsp cmd isn't executable (#19717)

The `onexit` handler isn't called if `uv.spawn` doesn't return a handle.
Diffstat:
Mruntime/lua/vim/lsp/rpc.lua | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/runtime/lua/vim/lsp/rpc.lua b/runtime/lua/vim/lsp/rpc.lua @@ -340,6 +340,9 @@ local function start(cmd, cmd_args, dispatchers, extra_spawn_params) end handle, pid = uv.spawn(cmd, spawn_params, onexit) if handle == nil then + stdin:close() + stdout:close() + stderr:close() local msg = string.format('Spawning language server with cmd: `%s` failed', cmd) if string.match(pid, 'ENOENT') then msg = msg