Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zombie Processes Generated on File Name Generation #1324

Closed
5 of 15 tasks
mdko opened this issue Jun 27, 2018 · 2 comments
Closed
5 of 15 tasks

Zombie Processes Generated on File Name Generation #1324

mdko opened this issue Jun 27, 2018 · 2 comments

Comments

@mdko
Copy link

mdko commented Jun 27, 2018

  • Category
    • fzf binary
    • fzf-tmux script
    • Key bindings
    • Completion
    • Vim
    • Neovim
    • Etc.
  • OS
    • Linux
    • Mac OS X
    • Windows
    • Windows Subsystem for Linux
    • Etc.
  • Shell
    • bash
    • zsh
    • fish

When starting fzf from a large directory (many files, many subdirectories, e.g. like my home directory), fzf begins getting the files to search through (https://github.com/junegunn/fzf/blob/master/src/core.go#L124, https://github.com/junegunn/fzf/blob/master/src/reader.go#L57), as expected. However, when I exit before it's done finding all the files (pressing ESC or C-c), the shell command it spawned via exec.Command(shell, "-c", command) remains running and does not die. When I run fzf again later and exit early, it will again abandon the spawned process, and it remains unreaped.

I current have FZF_DEFAULT_COMMAND set to rg --files --no-ignore --hidden --follow --glob "!.git/*". Thus in fish shell (likewise in bash and zsh):

$ fzf
... getting lots of files ...
>
<ESC>
$ ps -ef | grep rg
mdko 3622        1    0 15:43 pts/0  00:00:00 sh -c rg --files --no-ignore --hidden --follow --glob "!.git/*"
mdko 3624  3622  99 15:43 pts/0  00:00:00 rg --files --no-ignore --hidden --follow --glob "!.git/*"

I see that the reader code is called before the terminal I/O and event coordination in core.go, so I'm wondering if that has anything to do with not cleaning up these spawned processes.

@junegunn
Copy link
Owner

Check out #398, and see if it's related. Also make sure to have the latest version of rg.

@mdko
Copy link
Author

mdko commented Jun 28, 2018

Yes, it's fixed now; it was related to #398 and not having the latest rg (rg wasn't handling SIGPIPE properly, issue BurntSushi/ripgrep#200). Thanks for taking the time to point that out to me.

@mdko mdko closed this as completed Jun 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants