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

All .exe apps hang in WSL2 within Tmux but succeed outside Tmux #5057

Closed
matthew-nm opened this issue Apr 7, 2020 · 5 comments
Closed

All .exe apps hang in WSL2 within Tmux but succeed outside Tmux #5057

matthew-nm opened this issue Apr 7, 2020 · 5 comments

Comments

@matthew-nm
Copy link

matthew-nm commented Apr 7, 2020

Windows build number: Version 10.0.19041.172

I am able to run Windows binaries (such as cmd.exe) from WSL2 Ubuntu if I simply open the WSL2 terminal and execute the command from my shell of choice (zsh).

However, if I am inside of a tmux session, the command hangs, returns no output, and I can't kill the command with Ctrl+c. I have to kill the tmux pane and the process ends up stuck in my processes list with the tag [defunct].

Why would being inside tmux prevent a Windows command from executing?

I have included the strace from inside tmux:
strace.txt
and the strace from outside:
strace_outside.txt

Thanks for any insight. I am happy to include more information if asked.

@therealkenc
Copy link
Collaborator

Could not repro here.

image

@matthew-nm
Copy link
Author

I was using the WSLtty terminal but have done the same test via Powershell. It still fails within tmux, but a little more gracefully.

test_powershell.txt
test_powershell_tmux.txt

@matthew-nm
Copy link
Author

Problem solved. Bought a Mac.

@tsjk
Copy link

tsjk commented Oct 29, 2021

I have the same problem, under WSL 1. I login to my windows system via ssh, launch wsl and start tmux. All .exe calls hang, but I can abort them with ctrl-c. The same exe calls work from wsl without tmux, and also work under screen. Interestingly enough, they even work if I start a screen session in a tmux window. I wonder if it's some environment setting that messes things up.

@tsjk
Copy link

tsjk commented Oct 29, 2021

And, indeed.
I had the TERM variable set to TERM="screen-256color". For some reason, this makes exe calls fail. Changing it to TERM="tmux-256color", for instance, seems to be a remedy.

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

No branches or pull requests

3 participants