Repository navigation
RecompLauncher: write the log and copy its lines to the launcher's stream - #893
Merged
Merged
Conversation
…ream Started by RecompLauncher (RECOMPLAUNCHER set, not "0"), stderr is the launcher's pipe. On Windows that meant no lasrecomp.log next to the exe; on Linux the log took stderr and the launcher's game output stayed empty. The log is now opened as for any start, and a thread follows the log file and copies new bytes into a duplicate of the launcher's stderr. It drains at exit, in plat_exec, plat_terminate and plat_fatal_notice (try-lock there). On Linux the descriptor survives exec via LASRECOMP_LOG_TEE. macOS is unchanged. Ported from ReTri (peiikai/ReTri#94). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When RecompLauncher starts the game (
RECOMPLAUNCHERset, not0), stderr is the launcher's pipe.lasrecomp.logwas written next to the exe, so the launcher profile's log folder had nothing.Now the log is opened as for any start, and a thread follows the log file and copies new lines into a copy of the launcher's stderr. It drains at exit, in
plat_exec,plat_terminateandplat_fatal_notice(try-lock there). On Linux the descriptor stays open across exec throughLASRECOMP_LOG_TEE. macOS is unchanged.Ported from peiikai/ReTri#94.
Tests:
tools/test_windows_logs.py: launcher start and launcher relaunch write the log and the stream gets the same bytes;RECOMPLAUNCHER=0keeps the old behaviour.tools/test_cli.py: end-to-end check on Linux and Windows (CI runs it on Linux only).🤖 Generated with Claude Code