CLI: preserve the title entry point exit status #1593
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1594"
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?
Imported from Marvisak/VIctory. Originally posted by AwsAli05 on 2026-11-24T19:37:53Z.
When a title's entry point returns to VIctory, the CLI prints its status and currently exits with zero. That makes a failed boot look successful to scripts that use the process status. Return the title's status through the run command and preserve all 32 bits at the process boundary. A successful bind-only invocation still exits with zero.
Verification
On Windows, I loaded a synthetic PE that imports GetCurrentProcessId and returns 0x80000107 from its entry point. The old release build printed 2147483911 and exited with 0. The patched build returned 0x80000107 (PowerShell reports -2147483385). A second synthetic PE returned 0, and a bind-only run of the nonzero fixture also exited with 0.
The synthetic source was compiled with MinGW-w64 using a custom entry point and no CRT.
The CLI unit test, formatting check and staged asset policy passed. All inputs were synthetic.
Imported from Marvisak/VIctory. Originally posted by acetonahard-code on 2026-11-24T22:22:08Z.
Tested on Windows 11 with the repo toolchain, merged into current
main(70564ae):cargo test -p victorymainmain+ this PRcargo clippy --all-targets -- -D warnings, with and without--all-features: clean.I didn't test with game data.
Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.