Add stdout/stderr redirection to run_process - #9341
Open
alexreinking wants to merge 2 commits into
Open
Conversation
abadams
approved these changes
Aug 14, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9341 +/- ##
==========================================
+ Coverage 70.01% 70.04% +0.03%
==========================================
Files 258 258
Lines 78699 78716 +17
Branches 19160 19163 +3
==========================================
+ Hits 55100 55140 +40
+ Misses 17881 17878 -3
+ Partials 5718 5698 -20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Adds a run_process overload that redirects the child's stdout/stderr to given file paths (empty = inherit, same path for both = combined, as with shell `2>&1`). The existing single-argument overload now forwards to it with empty paths, so current callers are unaffected. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The re-exec'd child writes its markers through buffered C stdio, which defaults stdout/stderr to text mode on Windows and translates '\n' to '\r\n'. Force binary mode in the child so the redirected file content matches the Unix-style marker strings byte-for-byte on all platforms. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
alexreinking
force-pushed
the
alexreinking/run-process-redirect
branch
from
August 15, 2026 18:08
908b941 to
27561c3
Compare
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.
Adds file redirection to run_process. Needed by #9334