Skip to content

Bug: Windows - Remnant conhost.exe processes exist after fzf-lua search with default configuration followed by Neovim exit #2413

@zshoals

Description

@zshoals

RTFM Checklist

  • I have searched exisiting issues / discussions
  • I have read the Wiki including the Advanced section
  • I have read man fzf / I am well versed in shell fzf

Operating system

Windows 10

Shell

cmd

Neovim version (nvim --version)

NVIM v0.11.3

Fzf version (fzf --version)

0.66.0 (8cdfb23d)

Output of :lua print(os.getenv('FZF_DEFAULT_OPTS'))

nil

Is the problem reproducible with mini.sh?

  • My issue is reproducible with mini.sh
  • My issue IS NOT reproducible with mini.sh
  • I have not tested with mini.sh (not relevant, requires LSP, Windows, etc)

Fzf-lua configuration

require('fzf-lua').setup({})

Describe the bug / steps to reproduce

Title pretty much covers it; imagine my surprise when I couldn't delete an apparently in use folder, checked with Powertoys File Locksmith and saw 100 instances of conhost.exe attached to it :).

I think this might have to do with how the "hide" profile works? I tested with a very thin init.lua that just has the Lazy package manager bootstrapper and fzf-lua with an empty options table passed in, which from the sounds of things activates the "hide" profile by default. If I execute `require('fzf-lua').setup({ {"fzf-native"} }) to change the profile before calling :FzfLua I don't get these remnant conhosts on Neovim exit and it's shut down properly.

To replicate, I do the following:

  1. Start Windows Terminal with a Command Prompt instance open
  2. Start Neovim in the target directory via Command Prompt, no file passed
  3. Immediately open any fzf-lua picker (I.E. just :FzfLua, and no text entry required)
  4. Close the search
  5. :qa
  6. Say hello to my lonely perpetual conhost friend

The closest issue I could find to this problem was here: #2065. However, the fzf executable does close; it's just conhost.exe that remains active. I also thought this might be an issue with Neovim somehow, but a conhost process created with :terminal in Neovim gets properly shutdown on exit. I did search for any mentions of conhost in the issues and did not find anything.

I'm not super familiar with any of this stuff or the greater Neovim/lua ecosystem, fzf-lua being the culprit is just my best guess at the moment. Hopefully this is not just a dumb oversight on my part.

Video evidence just for fun (the conhost instances are not cleared on Windows Terminal exit):

conhosted_to_death.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstreamAn issue upstream (neovim, fzf, etc)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions