Skip to content

fix(executor): prevent output loss from Wait closing pipes - #93

Merged
sgaunet merged 1 commit into
mainfrom
fix/executor-output-loss
Sep 3, 2026
Merged

fix(executor): prevent output loss from Wait closing pipes#93
sgaunet merged 1 commit into
mainfrom
fix/executor-output-loss

Conversation

@sgaunet

@sgaunet sgaunet commented Sep 3, 2026

Copy link
Copy Markdown
Owner
  • create streams with os.Pipe so os/exec does not own them, keeping them
    readable until EOF instead of closing them when the child exits
  • close the parent's write ends after Start so readers still see EOF
  • correct stale ErrWaitDelay comment about undrained pipes
  • add TestExecutor_NoOutputLossAfterWait regression test

Closes #92

- create streams with os.Pipe so os/exec does not own them, keeping them
  readable until EOF instead of closing them when the child exits
- close the parent's write ends after Start so readers still see EOF
- correct stale ErrWaitDelay comment about undrained pipes
- add TestExecutor_NoOutputLossAfterWait regression test

Closes #92
@sgaunet sgaunet self-assigned this Sep 3, 2026
@sgaunet sgaunet added the bug Something isn't working label Sep 3, 2026
@sgaunet
sgaunet merged commit b8ec634 into main Sep 3, 2026
4 checks passed
@sgaunet
sgaunet deleted the fix/executor-output-loss branch September 3, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix silent output loss when Wait closes stdout/stderr pipes

1 participant