-
Notifications
You must be signed in to change notification settings - Fork 822
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
From 1803 to 1809, pty excretes ANSI that results in Emacs unkillable Console Window Host procs #3895
Comments
By the way, I thought about submitting this instead at https://github.com/Microsoft/console/issues. I didn't because this seems to be about running a Windows executable from WSL and not using the Windows console application. But I don't know how you view it internally, or even really what is going on under the hood. Maybe the console folks changed how WSL runs win exes, in order to support the console, and broke other scenarios?? Anyway I'm happy to cross-post the issue if you prefer. |
@greghendershott - It is likely this is console related. When Windows processes are launched, we create a Windows pseudoconsole under the hood. @bitcrazed, would you like an issue filed in the console GitHub? |
It can be avoided by the following method. $ exec > /dev/tty |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
I evaluated using WSL with Ubuntu Bionic and its Emacs 25.2.2 (via
sudo apt install emacs25
), for a workflow that includes running some Windows executables from Linux Emacs.I tried this on a spare laptop, with Windows 10 Home, 1803, 17134.590.
Things worked well enough that I bought a new laptop for this workflow.
Unfortunately it came with Windows 10 Pro, 1809, 17763.348. 😭
Steps:
ipconfig.exe
(for example -- or any Windows console executable, AFAICT).Result:
^[[6n
is displayed. The shell process in unresponsive, "hung" (although Emacs isn't).comint-interrupt-subjob
) and C-c C-\ (comint-kill-subjob
) have no effect.*shell*
buffer, it warns there's a process running.yes
to kill anyway./bin/bash --noediting -i
process -- you can see it gone from doing aps auwx
.Console Window Host
process -- and it's using 25% CPU, and can't be killed without logging out or restarting Windows.Console Window Host
processes.Ouch.
If instead you try M-x ansi-term, and enter
ipconfig.exe
, then it displaysThe
0;C:\Windows\System32\ipconfig.exe
and newline/indent is weird.At least it doesn't hang. But using
ansi-term
isn't a suitable work-around forshell-mode
. And, many, many things in Emacs open a pty and work fine whenTERM="dumb"
. For instance, many Emacs modes derive fromcomint-mode
likeshell-mode
does -- especially modes to run a programming language REPL or interpreter.Again: All of this "just-works" with 1803. Something changed after, by 1809.
Sort-of-work-around: If in your
init.el
you setprocess-connection-type
tonil
-- meaning pipe instead of pty -- then things like M-x shell will print e.g.Which is disconcerting but you can then enter
ipconfig.exe
and it will work fine.(However, if some code doesn't use the default and locally binds
process-connection-type
back tot
for something it does? Bad times.)The text was updated successfully, but these errors were encountered: