Skip to content

command: Always close stdout on context cancellation

In 12016efa (command: Improve error handling for stdout, 2023-08-31), we have started to close stdout when either waiting for a command to exit or when the context has been cancelled. This new mode ensures that we don't read partial output of spawned commands without noticing that the command has been killed and thus plugs a source of indeterminism.

This change has led to one issue when git-for-each-ref(1) is cancelled early after a pagination limit has been fixed, which was addressed via 899b60ac (ref: Handle SIGPIPE when truncating output from git-for-each-ref(1), 2023-09-14) before the new mode was rolled out to production systems. Other than that we did not observe any negative conseuqences on production systems at all since we have enabled the feature flag on September 18th.

Let's thus remove the feature flag and always close stdout unconditionally.

Closes #5558 (closed).

Merge request reports

Loading