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

hang with exec #178

Closed
aeosynth opened this issue Nov 25, 2017 · 2 comments · Fixed by #193
Closed

hang with exec #178

aeosynth opened this issue Nov 25, 2017 · 2 comments · Fixed by #193
Labels

Comments

@aeosynth
Copy link

sudo touch foo
fd foo -x rm {}

attempting to remove a write-protected file hangs

@sharkdp sharkdp added the bug label Nov 25, 2017
@sharkdp
Copy link
Owner

sharkdp commented Nov 25, 2017

Thank you for reporting this.

I believe this is due to rm waiting for input:

▶ sudo touch foo

▶ rm foo
rm: remove write-protected regular empty file 'foo'? 

Indeed, if you enter y, fd terminates:

▶ fd foo -x rm
y
rm: remove write-protected regular empty file 'foo'? %                                

Still, this is a bug because fd doesn't show the output of rm.

@ChengCat
Copy link

ChengCat commented Nov 27, 2017

rm is waiting for inputs from stdin. We could resolve this issue, if stdin is closed before executing rm. stdin isn't useful anyway, unless there is exactly one file in the result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants