WSL icon indicating copy to clipboard operation
WSL copied to clipboard

[WSLC] Expose WSLCProcessFlagsStdin via WslcProcessSettings - WslcGetProcessIOHandle(STDIN) returns E_INVALIDARG for all SDK callers

Open SohamDas2021 opened this issue 2 months ago • 2 comments

WslcGetProcessIOHandle(WSLC_PROCESS_IO_HANDLE_STDIN) returns E_INVALIDARG. CreateRelayedProcessIO creates and relays a stdin pipe, but only when WSLCProcessFlagsStdin is set (otherwise it closes stdin outright), and wslc exec -i sets it, which is why the CLI has working stdin and we don't.

The gap looks confined to the SDK layer: CopyProcessSettingsToRuntime leaves WSLCProcessOptions::Flags unset under a // TODO: No user access, and WslcProcessSettings exposes no setter for it, so no SDK caller can reach stdin.

SohamDas2021 avatar Sep 24 '26 16:09 SohamDas2021

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise, please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use .\collect-wsl-logs.ps1 -LogProfile networking instead, following the instructions in Collect WSL logs for networking issues

Once completed please upload the output files to this GitHub issue.

See Collect WSL logs (recommended method).

If you choose to email these logs instead of attaching them to the bug, please send them to [email protected] with the GitHub issue number in the subject, and include a link to your GitHub issue comment in the message body, and reply with '/emailed-logs'.

github-actions[bot] avatar Sep 24 '26 16:09 github-actions[bot]

This was fixed by #41698

dkbennett avatar Sep 25 '26 17:09 dkbennett