libcontainer/console_linux.go: Make SaneTerminal public #1479
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.
And use it only in local tooling that is forwarding the pseudoterminal master. That way runC no longer has an opinion on the
onlcr
setting for folks who are creating a terminal and detaching. They'll use--console-socket
and can setup the pseudoterminal however they like without runC having an opinion. With this commit, the only cases where runC still applies SaneTerminal is when it is the process consuming the master descriptor.Previous discussion in #1146 (which landed
saneTerminal
in the first place) and also on IRC earlier today. From that IRC discussion, this PR takes the “whoever gets the master descriptor can set it up as they see fit” approach. And alternative floated by @crosbymichael was to expose some subset of the termios structure in the config which had later support from @mrunalp. After further discussion, both @cyphar (here) and @crosbymichael (here) seem ok with the “setup the master descriptor as you see fit” approach I've taken here (although that doesn't mean they'll approve of the way I've implemented that approach).