yes: Silently handle broken pipe on windows#10429
Conversation
|
GNU testsuite comparison: |
|
To be clear, it is about this behavior: Also the patch is keeping this line for windows, because on windows there is no default sigpipe handler which would terminate the process and return 141. The requirements for handling BrokenPipe error on Windows are not clear to me. This code in tail.rs returns 13 on Windows, same thing in tr/src/simd.rs and cat.rs. Do you know where the requirement to return 0 on BrokenPipe in yes.rs come from? What's our reference implementation for this on windows? See this code of tail.rs The de-facto requirement we have for windows at the moment is that it must return 0 on BrokenPipe so that the tests which are calling |
|
I'm OK to merge this once the CI is green. Still the requirement to return 0 on Windows, while other utilities return 13, seems inconsistent to me. I don't want to block merging this PR because of this, though, because the behavior on unix is definitely a bug. |
8671fff to
95b2a49
Compare
|
GNU testsuite comparison: |
From the feedback here, #10254 separating this into a separate PR. This is required to pass the GNU timeout tests.