[PR #4905] Force WslDistroGenerator to timeout after 10s and return Profiles #26024

Open
opened 2026-01-31 09:13:26 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/4905

State: closed
Merged: Yes


When WSL.exe would hang for users, WslDistroGenerator would also hang
while waiting for its wsl.exe --list call to return. The timeout was
INFINITE in the WaitForSingleObject call, but we should slap a
timeout on it instead (here we choose 2 seconds). In addition, if it
times out, we should also just return profiles and let the Terminal
continue to start up without the WSL distro profiles loaded.

Validation Steps Performed

Made a sleep 30 executable as the command instead, made sure it hit the
WAIT_TIMEOUT and continued to start up without loading my Ubuntu
profile.

Closes #3987

**Original Pull Request:** https://github.com/microsoft/terminal/pull/4905 **State:** closed **Merged:** Yes --- When WSL.exe would hang for users, WslDistroGenerator would also hang while waiting for its `wsl.exe --list` call to return. The timeout was `INFINITE` in the `WaitForSingleObject` call, but we should slap a timeout on it instead (here we choose 2 seconds). In addition, if it times out, we should also just return profiles and let the Terminal continue to start up without the WSL distro profiles loaded. # Validation Steps Performed Made a sleep 30 executable as the command instead, made sure it hit the `WAIT_TIMEOUT` and continued to start up without loading my Ubuntu profile. Closes #3987
claunia added the pull-request label 2026-01-31 09:13:26 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26024