Remove SIGWINCH from signal kill set#1854
Open
ArasanDev wants to merge 1 commit into
Open
Conversation
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.
Type of Change
Motivation and Context
Fixes #1747.
SIGWINCHis a terminal geometry notification — its POSIX-defined purpose is to inform a process that the controlling terminal's window size has changed. It is not a process-control signal and has no meaningful effect when delivered viakill(2)to a process without a controlling terminal.ProcessIO.signalSetincludedSIGWINCHalongsideSIGTERM,SIGINT,SIGUSR1, andSIGUSR2. In non-TTY mode (console == nil),handleProcessiteratessignalSetand forwards every received signal throughprocess.kill(sig). This caused host terminal resize events to produce a logged error on stderr:There is no valid use case for forwarding
SIGWINCHas a kill signal in non-TTY mode — the container has no pseudo-terminal whose geometry could change.TTY mode is unaffected. In TTY mode (
console != nil), thesignalstask is never added to the task group. A separatewinchHandlerregisters independently for[SIGWINCH]and routes it toprocess.resize(), which is the correct handler. RemovingSIGWINCHfromsignalSetdoes not touch this path.As a secondary benefit, this also eliminates a redundant
DispatchSourceSignalregistration forSIGWINCHin TTY mode: previously bothsignals(viasignalSet) andwinchHandlerregistered for the same signal, withsignalsnever consumed in the TTY branch.Testing
make testpasses