fix(#2386): kill git zombies (#2401)

This commit is contained in:
Alexander Courtis
2023-09-03 17:26:05 +10:00
committed by GitHub
parent 277632fbd9
commit 5897b3622f

View File

@@ -89,12 +89,14 @@ function Runner:_run_git_job(callback)
stderr:read_stop()
stdout:close()
stderr:close()
if handle then
-- don't close the handle when killing as it will leave a zombie
if rc == -1 then
pcall(vim.loop.kill, pid, "sigkill")
elseif handle then
handle:close()
end
pcall(vim.loop.kill, pid)
if callback then
callback()
end