Repository navigation
fix(engines): LibreOffice 26 version, output drain timeout, msiexec log cleanup - #1034
Merged
Merged
Conversation
…og cleanup - CopyVersions: LibreOffice 26's version.ini has no MsiProductVersion any more, so a user's own LibreOffice showed no version. Also read the product version of soffice.exe next to it. - ProcessRunner: a program can exit while one it started still holds the inherited output pipes (soffice.bin after soffice.exe). WaitForExitAsync also waits for the end of the output, so the run waited until its time limit and failed although the program had finished. Wait for the exit itself, then give the rest of the output 30 s at most and note in standard error when it is incomplete. - EngineInstaller: delete the verbose msiexec log after a successful unpack; a failed one keeps it, since the error names it. Co-authored-by: jojofox0815 <125126720+jojofox0815@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s before the drain With #1015's output probe and Job Object in, the program's own exit no longer waits for the output pipes, so a child that holds them (soffice.bin) is ended through the job right away instead of using up the 30 s drain. The probe test now covers a script that finished its PDF but keeps running, and a separate test covers the child. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 of 13 tasks
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.
Three small engine fixes.
LibreOffice 26 version on the Engines page. LibreOffice 26's
version.inino longer carriesMsiProductVersion, so a LibreOffice the user installed showed no version (and no "update recommended").CopyVersionsnow also reads the product version ofsoffice.exenext toversion.iniand parses that when the ini has none. Tests: twoVersions_are_read_from_each_programcases, andA_libreoffice_without_msi_version_is_told_by_its_program, which puts a copy of the test host (any program with a version resource) next to an ini withoutMsiProductVersion.Output drain timeout in
ProcessRunner. A program can exit while a program it started still holds the inherited output pipes (soffice.bin after soffice.exe). Since .NET'sProcess.WaitForExitAsyncalso waits for the end of the output, the conversion then waited until its full time limit and failed with a timeout, although the program had finished.RunAsyncnow waits for the program itself to exit (Exitedevent), then gives the rest of the output 30 s at most; after that it goes on with the exit code it has and notes in standard error that the output is incomplete. Cancellation still applies during those 30 s.Note: #583 put the 30 s limit on the parameterless
process.WaitForExit()after the wait. On .NET 10 that call returns at once becauseWaitForExitAsynchas already drained the output (checked withcmd /c start /b ping ...:WaitForExitAsynctook 7.3 s, the followingWaitForExit()0 ms), so the limit has to sit on the wait itself.Checked against the built
ProcessRunnerwithcmd /c "echo hello & start /b ping -n 60 127.0.0.1 >nul": it returns after 30.4 s with exit code 0,helloin standard output and the note in standard error; on main it waits the full 60 s for ping.msiexec log. After a successful administrative unpack the verbose
filee-msiexec.logis now deleted from%TEMP%. A failed unpack keeps it, since the error names it.Split out of #583 by @jojofox0815, who wrote the original change.
🤖 Generated with Claude Code