Skip to content

fix(extract): close dar stdin to avoid BrokenPipeError at GC#25

Merged
Xitee1 merged 1 commit into
mainfrom
fix/extract-broken-pipe
May 19, 2026
Merged

fix(extract): close dar stdin to avoid BrokenPipeError at GC#25
Xitee1 merged 1 commit into
mainfrom
fix/extract-broken-pipe

Conversation

@Xitee1
Copy link
Copy Markdown
Owner

@Xitee1 Xitee1 commented May 18, 2026

Summary

  • extract_sequential left proc.stdin open after dar exited; the ESC-feeder daemon thread kept the TextIOWrapper alive, and Python's finalizer later raised BrokenPipeError flushing buffered bytes into the dead pipe.
  • Close proc.stdin in a finally and suppress the expected BrokenPipeError/OSError, so the cancel path and the normal completion path both end cleanly.

Test plan

  • Run bd-archive extract against a complete disc set and confirm no Exception ignored while finalizing file appears after the dar summary.
  • Run an extract against a partial set (forces dar prompts → ESC feeder actively writing) and confirm the same clean exit.

🤖 Generated with Claude Code

The ESC-feeder daemon thread kept proc.stdin's TextIOWrapper alive
past dar's exit. The wrapper's finalizer flushed buffered bytes into
the now-dead pipe, surfacing a BrokenPipeError after the extract
summary banner. Close stdin explicitly in a finally and suppress
the expected pipe error.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Xitee1 Xitee1 merged commit b15ceec into main May 19, 2026
1 check passed
@Xitee1 Xitee1 deleted the fix/extract-broken-pipe branch May 19, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant