Skip to content
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

wsl-helper: close /attach on /wait exit. #1354

Closed

Conversation

mook-as
Copy link
Contributor

@mook-as mook-as commented Jan 27, 2022

On Windows, running interactive docker sessions does not quit correctly when the container exits; instead, the user must press a key to let the client notice the end of the connection. This does not happen on Linux (in WSL). The underlying API (/containers/{id}/wait) appears to work correctly however; the connection closes correctly. As a workaround, forcefully close any /containers/{id}/attach connections when a corresponding /wait returns.

Fixes #1171.

On Windows, running interactive docker sessions does not quit correctly
when the container exits; instead, the user must press a key to let the
client notice the end of the connection.  This does not happen on Linux (in
WSL).  The underlying API (/containers/{id}/wait) appears to work correctly
however; the connection closes correctly.  As a workaround, forcefully
close any /containers/{id}/attach connections when a corresponding /wait
returns.

Signed-off-by: Mark Yen <[email protected]>
@mook-as
Copy link
Contributor Author

mook-as commented Jan 27, 2022

Hmm, this doesn't help with docker exec -t -i …, because that exits before the container is removed. This causes #1318.

I'll have to try to fix /attach directly instead.

@mook-as mook-as closed this Jan 27, 2022
@mook-as mook-as deleted the wsl-interactive-newline branch January 28, 2022 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Executing an interactive terminal needs keystroke after exiting
1 participant