launcher: clear standard handles before FreeConsole #2
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ReTerryDavis--ReVIctory!2
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@MoltenHydrogen on GitHub · 2026-11-29 19:05 UTC · original
MoltenHydrogen:main→main· +9 −3 · 1 files · 1 commits · closed without mergingProblem
When
victory.exeis launched without arguments,window::rundetaches from its console viaFreeConsole()without clearing the process's standard I/O handles (STD_INPUT_HANDLE,STD_OUTPUT_HANDLE,STD_ERROR_HANDLE).Clicking Translate, Warm used, or Warm all spawns a child
victory.exeprocess withCREATE_NEW_CONSOLEand default (Stdio::inherit) handles. On Windows 11 / Windows Terminal (ConPTY),CreateProcessfails to duplicate the parent's freed console handles and returnsos error 50(ERROR_NOT_SUPPORTED):Fix
Call
SetStdHandlewithnull_mut()forSTD_INPUT_HANDLE,STD_OUTPUT_HANDLE, andSTD_ERROR_HANDLEimmediately beforeFreeConsole()inapps/victory/src/launcher/window.rs.With null standard handles and
CREATE_NEW_CONSOLE, Windows automatically attaches the new console window's standard handles to the spawned child process so progress output remains visible in the spawned window.Testing
victoryin--releasemode on Windows 11.victory.exedirectly without arguments and clicked Translate, Warm used, and Warm all; each opens its separate console window and runs withoutos error 50.Code and description were written by Gemini Neon and Hydrogen, respectively.
@ReTerryDavis on GitHub · 2026-11-29 19:42 UTC · original
thank you but i just fixed this in
9a70c8cPull request closed