-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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 previous interrupt handler after run #5808
Restore previous interrupt handler after run #5808
Conversation
Seems like a good change to me, but it requires a changelog entry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me. Is it possible to write a test for this?
@bbatsov Changelog entry added!
Of course it is, but I don't really feel very excited about it. If this is not good to go without a test I'll just leave this opened so anyone willing to do it (including future me) can pick it up! :) |
Actually I'll add that test since this commit is actually breaking the default rubocop handler during rubocop test suite... Calling this WIP. Not sure when I'll get to it though. EDIT: Actually no, the behavior is the same as in master. During execution of |
OK, ping us when ready. |
@deivid-rodriguez ping :-) |
Hei @bbatsov, I don't think I'll get to this any time soon. I'll close this and reopen when I get time to complete it! :) |
Ended up opening some separate PRs with a different approach to fix this, also with some testing! |
I was running
puma
's test suite, where rubocop is run before the test suite. One of the tests was hanging, and when pressing Ctrl-C to abort it, I would getrubocop's
Ctrl-C handler run.That seemed unexpected, I think rubocop should probably restore the previously installed handler after it's run?
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.
rake default
orrake parallel
. It executes all tests and RuboCop for itself, and generates the documentation.