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

restore the default SIGPIPE behavior as a temporary workaround #586

Merged
merged 1 commit into from
Aug 27, 2017

Conversation

oconnor663
Copy link
Contributor

See #200.

This is a Unix-only workaround, until the larger refactoring mentioned in that issue is done. I'm not sure what our current behavior is on Windows, but this should't change it in any case. Are there any cases where rg has side effects, where a sudden termination like this might not be a good idea?

Copy link
Owner

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a fine idea, thanks!

I don't think anything bad can come from terminating pre-maturely. In particular, anyone should be able to ^C ripgrep at any time to make it stop immediately, which basically uses the same method employed (terminate the process via a signal).

I'm sad to see another unsafe in ripgrep proper, but this is a temporary work-around, the risk is basically nil and it solves an annoying UX problem.

@BurntSushi BurntSushi merged commit 3065a8c into BurntSushi:master Aug 27, 2017
@oconnor663
Copy link
Contributor Author

Thanks for the quick turnaround!

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

Successfully merging this pull request may close these issues.

2 participants