Skip to content

programs: bind output directories before opening inputs - #5108

Open
Cyan4973 wants to merge 1 commit into
devfrom
output-parent-binding
Open

Cyan4973 wants to merge 1 commit into
devfrom
output-parent-binding

Conversation

@Cyan4973

@Cyan4973 Cyan4973 commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #5009.

Resolve each output file's parent directory before opening its input stream.
This keeps output creation and overwrite decisions consistent if an independent output directory is renamed while the input is opening.

The source-handling function now owns both directory descriptors and releases them on every return path, including source-open failures.

Tests

  • Add 12 cases covering compression and decompression, explicit output names and --output-dir-flat, and creation, forced overwrite, and overwrite refusal.
  • Extend the low-descriptor-limit test to cover repeated source-open failures followed by a valid input.

@meta-cla meta-cla Bot added the CLA Signed label Dec 3, 2026
@Cyan4973 Cyan4973 self-assigned this Dec 3, 2026
Resolve per-file output directories before opening the input stream. Keep their descriptors alive through output handling and release them alongside the input directory, including on source-open failures. Leave shared-output and test-mode handling unchanged.

Extend directory-rename tests to cover independent output paths, creation, overwrite decisions, and source-open cleanup under a low descriptor limit.
@Cyan4973
Cyan4973 force-pushed the output-parent-binding branch from ddb9b5f to ee1d680 Compare December 4, 2026 01:07

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant