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

Background and redirected windows commands allocate windows console when executed from wslg #9551

Closed
albatrossen opened this issue Jan 25, 2023 · 3 comments
Assignees
Labels

Comments

@albatrossen
Copy link

Windows build number:

10.0.19044.0

Your Distribution version:

22.04.1 LTS

Your WSL versions:

WSL-version: 1.0.3.0
Kerneversion: 5.15.79.1
WSLg-version: 1.0.47
MSRDC-version: 1.2.3575
Direct3D-version: 1.606.4
DXCore-version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows: 10.0.19044.2486

Steps to reproduce:

  1. Start xterm using the shortcut in windows start menu
  2. cd /mnt/c #just to get rid of a cmd.exe warning, not actually required
  3. cmd.exe /c "ping -n 10 127.0.0.1" > /dev/null

WSL logs:

No response

WSL dumps:

No response

Expected behavior:

I would expect the same as when executed from a wsl shell in powershell. That is no windows console is opened.

Actual behavior:

A windows console window pops up until the command is done executing:
screenshot

@albatrossen
Copy link
Author

Also if you run the command from wsl.exe in a powershell terminal it does not have this issue. This is why I'm reporting it against wslg and not wsl....but could be it needs to be solved in wsl and not wslg, neither is it a problem when using the terminal from vscode with wsl integration.

But it is the same problem in gnome-terminal, xterm and terminator.

Interestingly cmd.exe /c "ping -n 10 127.0.0.1 > NUL" does not allocate a console, nor do any other kind of foreground program.

Also the steps are just a way to reproduce the problem. The actual reason we are reporting it, were because a python script captures the output of a windows command, which results in some console flicker when that script is executed.

@OneBlue OneBlue transferred this issue from microsoft/wslg Jan 28, 2023
@OneBlue OneBlue self-assigned this Jan 28, 2023
@OneBlue
Copy link
Collaborator

OneBlue commented Jan 28, 2023

Transferring to WSL since that issue comes from WSL interop

@benhillis
Copy link
Member

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

No branches or pull requests

3 participants