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
Improve Ctrl-C handling #6461
Improve Ctrl-C handling #6461
Conversation
I rebased this PR after #6537 being merged. This PR still removes the 2-phase Ctrl-C handling but does not suffer from the problem explained in #6452 (comment). |
I rebased this one again, any thoughts? :) |
I prefer |
Rebased again and added a changelog entry. |
new cop mebbe? |
Maybe... In my experience, |
@mikegee I'm actually using |
By not installing global trap handlers, we prevent any conflicts with any other installed handlers. This means that, for example, when running cli or runner specs, one can interrupt rubocop and get the expected Ctrl-C handling (RSpec's one). It also means that rubocop's Ctrl-C handling is never leaked outside of rubocop, like it happens when running puma's test suite.
Can use capture other signals without |
Yeah, @mikegee was referring only to |
This PR builds on top of #6452 and improves the user experience when clicking Ctrl-C by not installing any global trap handlers, and thus:
I felt it was better to propose these changes as two separate PRs, so technically this PR depends on #6452. But all changes in both PRs are included here, so if it's handier or considered better, this PR could be reviewed and merged direcly as a single set of changes, and thus superseding #6452.
Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).and description in grammatically correct, complete sentences.
bundle exec rake default
. It executes all tests and RuboCop for itself, and generates the documentation.