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

Some windows command-line programs hang rather than run #2791

Closed
VanL opened this issue Dec 28, 2017 · 3 comments
Closed

Some windows command-line programs hang rather than run #2791

VanL opened this issue Dec 28, 2017 · 3 comments

Comments

@VanL
Copy link

VanL commented Dec 28, 2017

Summary: Most (but not all) windows command line programs hang when run from inside WSL. GUI programs (code.exe, notepad.exe, calc.exe, etc) all launch as expected. Powershell launches, cmd.com launches, a few others. Most hang until a Ctrl-C stops the process. (They could be running and the I/O streams are just not being properly redirected back to the bash shell)

Your Windows build number:

16299.125

Environment: Ubuntu 16.04, installed from store. Running bash (with some bash-it customizations). I have the command-not-found-handle hooked so that if an executable is not found with the bare name, the windows-specific suffixes (.exe, .com, .bat, .cmd) are tried instead. I have tried disabling the command-not-found handle; no change.

I'm using the hyper shell, but this also happens from the vanilla shell. As an aside, "which" doesn't always find the windows binaries, but the GUI ones launch anyway.

What you're doing and what's happening:

Here is an example terminal session.

vanl@VXPS in ~
○ → echo $PATH
/opt/anaconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/c/Windows:/c/Windows/System32:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/wbem:/c/Windows:/c/Windows/System32:/c/Windows/System32/wbem:/c/Window
s/System32/WindowsPowerShell/v1.0:/c/Program Files/PuTTY:
...[snip]...
:/c/Program Files/Microsoft VS Code/bin:/c/Users/VanL/AppData/Local/Sysinternals:/c/Users/VanL/AppData/Local/bin:/c/Libraries/Anaconda3/Scripts:/snap/bin:/opt/bin:/opt/local/bin:/opt/cargo/bin

# Linux python works:

○ → python
Python 3.6.3 |Anaconda, Inc.| (default, Oct 13 2017, 12:02:49)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

^C

# Try Windows Python (separate installation)

○ → ls -l /c/Libraries/Anaconda3/python.exe
-rwxrwxrwx 2 root root 93696 Oct 15 06:30 /c/Libraries/Anaconda3/python.exe

○ → /c/Libraries/Anaconda3/python.exe
^C

# Hangs, no output. However, some programs work:

○ → powershell
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\VanL> ^C

# or:

○ → /c/Libraries/Anaconda3/Scripts/conda.exe
usage: conda [-h] [-V] command ...

conda is a tool for managing and deploying applications, environments...[output snipped]

What's wrong / what should be happening instead:

I should see the windows python interactive prompt.
Python 3.6.3 |Anaconda, Inc.| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

Strace of the failing command, if applicable: Here

@cylonid
Copy link

cylonid commented Jan 22, 2018

I can confirm this for the python.exe console on Bash. This issue started since I updated from Creators Update to Fall Creators Update, so it already used to work in the past.

Python itself does work, piping a code file into the interpreter ("python.exe < code.py") is possible.

@therealkenc
Copy link
Collaborator

Like #2370 (message) but @benhillis should say the official word.

@benhillis
Copy link
Member

@therealkenc is correct, this is the same issue that node.exe and others are hitting. Working on a change that should get this working. Closing this issue as a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants