-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
tee: remove output buffering #8218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
GNU testsuite comparison:
|
The CI failure doesn't seem related to the PR. |
GNU testsuite comparison:
|
ceae35e
to
01b6d24
Compare
@RenjiSann You comment made me think. The test I wrote would hang indefinitely in case of buffered output. This might be fine since it should never fail. But in unlikely event of it still failing, the reason for hanging will be hard to understand. So I rewrote the test a little, so that it is stopped by timeout instead of hanging. This makes the test code a little bit more complicated, but I think the result is much better. I also added a few comments to explain what the test is doing. |
To comply with POSIX standard `tee` implementation must not buffer its output, so we replace std::io::copy implementation that does buffering with the custom one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks for adding details!
GNU testsuite comparison:
|
To comply with POSIX standard
tee
implementation must not buffer its output, so we replacestd::io::copy
implementation that does buffering with the custom one.Fixes #8198