autozimu / LanguageClient-neovim

Language Server Protocol (LSP) support for vim and neovim.
MIT License
3.55k stars 272 forks source link

Zombie burying ritual #1264

Open ulidtko opened 8 months ago

ulidtko commented 8 months ago

I've noticed LanguageClient-neovim accumulates zombies on LSP-server restarts... :ghost:

Classically, whenever that happens — it means the parent process doesn't respect its duty to at least read out the exit-code of children processes that die.

Here's a fix by means of keeping track of the spawned Child process instead of its u32 PID. IIRC, it wasn't possible to construct a Child from bare PID for that child.try_wait() call. See code.