Repository navigation
Preserve SIGINT handler after external paging - #725
Open
hugosmoreira wants to merge 1 commit into
Open
hugosmoreira wants to merge 1 commit into
hugosmoreira wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #723.
More()temporarily ignores SIGINT while an external pager runs, but currently resets it to SIG_DFL afterward and leaves it ignored if paging raises. Save the previous handler and restore it infinally, preserving the original exception.Add regression tests for custom/default/ignored handlers, explicit and discovered pagers, startup/encoding/communication/wait failures, and the
Display()caller. Noninteractive output and internal-pager routes have compatibility controls.Validation:
catpager and deliver SIGINT afterward; the custom callback is retained. Unchanged master loses it.macOS and the remaining hosted matrix were not run. Interactive detection is controlled in the pager checks; no manual terminal session is claimed.
#666 overlaps exception cleanup but still restores SIG_DFL. This change preserves the previous handler without changing command parsing or fallback behavior.