aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/Watch.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-11-27 00:10:33 +0000
committerMatthew Lugg <mlugg@mlugg.co.uk>2024-11-27 19:35:31 +0000
commit1a99c99ee99fa3ca43935fe7d7d0865145b82d4e (patch)
tree977a570f2bf72ddfaa6fe7f8d754161c5e4581ad /lib/std/Build/Watch.zig
parent3ce6de87657e67da358e9c7869a87c61cc9f1305 (diff)
downloadzig-1a99c99ee99fa3ca43935fe7d7d0865145b82d4e.tar.gz
zig-1a99c99ee99fa3ca43935fe7d7d0865145b82d4e.zip
std.Build: gracefully handle child stdin closing when running tests
We have deduced that it seems the sporadic BrokenPipe failures happening on the CI runners (e.g. https://github.com/ziglang/zig/actions/runs/12035916948/job/33555963190) are likely caused by the test runner's stdin pipe abnormally closing, likely due to the process crashing. Here, we introduce error handling for this case, so that if these writes fail, the step is marked as failed correctly, and we still collect the child's stderr to report. This won't fix the CI issues, but it should promote them to proper error messages including child stderr, which -- at least in theory -- should allow us to ultimately track down where the errors come from. Note that this change is desirable regardless of bugs in the test runner or similar, since the child process could terminate abnormally for any number of reasons (e.g. a crashing test), and such cases should be correctly reported by the build runner.
Diffstat (limited to 'lib/std/Build/Watch.zig')
0 files changed, 0 insertions, 0 deletions