-
Notifications
You must be signed in to change notification settings - Fork 849
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 process tree survives a taskkill #2496
Comments
@hurricup - Thanks for your post. What were your expectations when using
That is because when the last bash.exe process is closed, WSL terminates all the Linux processes by sending |
The name So it looks like you have one If you want to kill ruby from the win32 side, kill the |
I have been playing around with this and it seems like there is a legitimate bug here in WSL. @therealkenc - The issue is simple. Here is the repro:
One would expect the python server to also die along with the bash/terminal. That's how it also behaves on native Ubuntu. The problem seems that the |
@sunilmut - That isn't the scenario described. There, unrelated PID 55 from the first screencap got killed. Sending a
Now, kill
On Real Linux,
Heads up on related #2391. |
@therealkenc no. that's exactly that scenario. That extra bash just an artifact separate bash.
|
There is no second
And:
No WSL processes were harmed in the making of this film. |
@therealkenc clarification: when i saying start bash, i mean start |
An update that a PR is out for review (thanks @Brian-Perkins) and should be out to Insiders soon. |
will it make it for the fall update? |
@Madder - No, the fall update build was finalized before this change was made. |
Fixed in 1803. |
Windows Pro 1703, build 15063.608
Installed WSL and ruby inside it. Generated ruby rails application.
Starting it from the windows with:
bash -c "rails server -b 127.0.0.1 -p 3000 -e development"
Looks like this:
From other bash's htop I see:
If I press
Ctrl-C
in the bash i've started server - everything works as expected:But, if I'm using
taskkill /pid WIN_BASH_EXE_PID /f /t
, bash dies, but process tree does not:Suddenly, init with pid 1 becames a parent of the process launched with killed bash. If all bash windows are closed, process tree being killed (seems in some bad way, not gracefully)
Attempts to send 3 (
Ctrl-C
i believe) to the windows bash via stdout not helping.Is this a bug or exected behavior and i'm doing something wrong?
The text was updated successfully, but these errors were encountered: