Skip to content

tee: restrict splice to one writer case - #16204

Open
oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:tee-notee
Open

oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:tee-notee

Conversation

@oech3

@oech3 oech3 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Closes #15803
This can be an extension. But usacase of it is probably specialized for some specific server...

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/tee/write-eagain. tests/tee/write-eagain is passing on 'main'. Maybe you have to rebase?

@oech3

oech3 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

write-eagain is not a regression. It was just masked by different impl.

Comment thread src/uu/tee/src/tee.rs Resolved
Comment thread src/uu/tee/src/tee.rs Resolved
Comment thread src/uu/tee/src/tee.rs Resolved
@oech3
oech3 force-pushed the tee-notee branch 4 times, most recently from fea615d to 549be47 Compare November 6, 2026 00:15
Comment thread tests/by-util/test_tee.rs Resolved
@sylvestre

Copy link
Copy Markdown
Contributor

thanks for working on this!
a stdin read error is still printed twice: once with tee-error-stdin, then again with the writer's name (see inline).
please also check that tests/tee/write-eagain passes with the read/write path, now that stdout + file no longer uses splice.

@oech3

oech3 commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

I think fix for write-eagain should be different PR since it is cominfg form different code path.

@oech3

This comment was marked as outdated.

@oech3

oech3 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor Author

OK. I understand what you see. /proc/self/mem is not useful at here since it means fallbacking.

Co-authored-by: kprobe0 <238360162+kprobe0@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

tee: zero-copy lets stdout and FILE differ if input changes after tee exits

2 participants