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

Exit early from exec #224

Closed
corbinu opened this issue Jan 23, 2018 · 6 comments
Closed

Exit early from exec #224

corbinu opened this issue Jan 23, 2018 · 6 comments

Comments

@corbinu
Copy link

corbinu commented Jan 23, 2018

First of all love fd is an amazing project!

I was using it recently to exec a sed command and made a mistake. Noticed that Ctrl+C to exit early wasn't working

@sharkdp
Copy link
Owner

sharkdp commented Jan 23, 2018

Thank you very much for the feedback!

Indeed, that looks like a problem.

One way to reproduce this:

> mkdir test; cd test
> touch {1..100}
> fd -x sleep
# try to break out via Ctrl-C

@Doxterpepper
Copy link
Contributor

Doxterpepper commented Jan 24, 2018

Sorry @sharkdp, looks like this is the fault of the ctrl-c handler agian 🙃 . The ctrl-c handler I added months ago didn't account for exiting from exec. For some reason I thought colored output would not be enabled when the exec flag was given. I'll have a PR for this in a few.

If you do fd -c never -x sleep then ctrl-c works, fd -c always -x sleep will hang.

@sharkdp
Copy link
Owner

sharkdp commented Jan 24, 2018

Sorry @sharkdp, looks like this is the fault of the ctrl-c handler agian .

Nothing to excuse for - thank you very much for finding the bug and fixing it so fast!

@sharkdp
Copy link
Owner

sharkdp commented Jan 28, 2018

Closed via #225

@sharkdp sharkdp closed this as completed Jan 28, 2018
@sharkdp
Copy link
Owner

sharkdp commented Feb 10, 2018

Fix released in v6.3.0

@corbinu
Copy link
Author

corbinu commented Feb 10, 2018

Thanks folks :)

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

No branches or pull requests

3 participants