Skip to content

flight-cli: a broken pipe on the plain/fan-out calendar arms exits 120 - #315

Merged
ak2k merged 3 commits into
mainfrom
driver-h70kv-29
Oct 26, 2026
Merged

ak2k merged 3 commits into
mainfrom
driver-h70kv-29

Conversation

@ak2k

@ak2k ak2k commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Piping a flight command into head or another reader that hangs up now ends with the exit code the command chose, not CPython's stray 120, and no BrokenPipeError traceback.

Class: STANDARD

Gates:
03-oracle: green
04-review: FINDINGS
06-oracle: green
07-gate: AGREEMENT_CLEAN

Commits:

  • flight-cli: a closed stdout keeps the command's exit code at exit
  • flight-cli: a closed pipe ends with the command's exit code, not 120
  • flight-cli: test that a closed pipe keeps the command's exit code

ak2k added 3 commits October 25, 2026 23:49
A child runs the entry point with stdout a pipe whose reader is gone; it
must end with the code the command chose and no BrokenPipeError. A second
test pins the memo sentence that describes the entry point's flush.

Unit: work-h70kv.29
The flight entry point flushes stdout once the command returns or exits.
When the reader has hung up, it points stdout at /dev/null, so CPython's
final flush no longer fails and forces exit 120 with a BrokenPipeError
on stderr. Any other failed write, such as a full disk, is left for
CPython to report at exit as before.

Unit: work-h70kv.29
A process started with fd 1 closed has sys.stdout set to None, so the
entry point's stdout flush raised AttributeError in its finally and
turned every exit code into 1. The flush now skips a missing stream, as
CPython does at exit.

Unit: work-h70kv.29
Fixes-unit: work-h70kv.29
@ak2k
ak2k marked this pull request as ready for review October 26, 2026 05:18
@ak2k
ak2k merged commit 4b84aba into main Oct 26, 2026
3 checks passed
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