term/winconsole: Identify tty correctly, fix resize problem #11840
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.
This change fixes a bug where stdout/stderr handles are not identified
correctly as file descriptors on windows.
Previously we used to set the window size to fixed size to fit the default
tty size on the host (80x24) because we couldn't find out why
monitorTtySize
wasn't called at all. Turns out it was a bug we fixed here.Now the attach/exec commands can correctly get the terminal size from windows.
We still do not
monitorTtySize()
correctly on windows and update the ttysize on the host-side, in order to fix that we'll provide a
platform-specific
monitorTtySize
implementation in the future.❗ ❗ @jfrazelle it would be great to cherry-pick this fix to 1.6 release branch as we got plenty of feedback saying "every time I run docker.exe it resizes my terminal, it's annoying". ❗ ❗
Signed-off-by: Ahmet Alp Balkan ahmetalpbalkan@gmail.com
cc: @tiborvass @sachin-jayant-joshi