-
Notifications
You must be signed in to change notification settings - Fork 797
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
WSL2 process never releases and gets frozen forever when stdin is redirected #4424
Comments
Some more info:
We can try to debug OpenJDK as last resort, but any help is appriciated. |
SergeyZh
pushed a commit
to JetBrains/intellij-community
that referenced
this issue
Sep 30, 2019
…use of microsoft/WSL#4424 GitOrigin-RevId: 7ad25362a788ad57ffb8d4063de35dfb0273e882
Reproduced with plain C + Win32API.
|
For those, who prefer C#/.NET
|
Thanks for posting, I have identified an issue when stdin is a pipe handle that does not get closed. |
@benhillis it seems this issue is fixed in latest EAP. is it true? |
Yes it should be. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please note this bug is already known (#2592), it was fixed in 1803, but with latest (I suppose) Insider Preview the problem is become still actual.
How to reproduce:
Convert distro (ubuntu1804 for example) to WSL2.
Run "ubuntu1804 run env" from your app and redirect stdin (by setting
RedirectStandardInput = true
for .NET or.hStdInput
for Win32Api). Wait for process to finish (WaitForSingleObject or WaitForExit()).Expected result: process ends (as it happens with WSL1).
Actual result: process never ends. On Windows side descriptor never releases.
On Linux side "init " process becomes zombie (Z)
Here's simple example which shows the problem in Java:
Environment:
STR
Following example shoud start ubuntu run env, echo output and quit. However, ubuntu.exe waiting for input.
The text was updated successfully, but these errors were encountered: