Skip to content

buf_copy/linux.rs: replace flush by raw write#12401

Open
oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:flush-after-splice
Open

buf_copy/linux.rs: replace flush by raw write#12401
oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:flush-after-splice

Conversation

@oech3
Copy link
Copy Markdown
Contributor

@oech3 oech3 commented May 20, 2026

flush is just an workaround to avoid wrong order of output. Proper solution is writing to fd without buffering.
(This matches with GNU cp's unbuffered cp /dev/stdin ....)

Closes #12405

@oech3 oech3 marked this pull request as ready for review May 20, 2026 12:00
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 20, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/date/date-locale-hour (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/basenc/bounded-memory is now being skipped but was previously passing.
Note: The gnu test tests/expand/bounded-memory is now being skipped but was previously passing.
Congrats! The gnu test tests/cut/cut-huge-range is now passing!

@xtqqczze
Copy link
Copy Markdown
Contributor

@oech3 Sorry that #12405 overlaps, if I had noticed earlier, I would have suggested the changes here instead. That said, I think that PR takes the better approach by using types to prevent incorrect output ordering.

@oech3
Copy link
Copy Markdown
Contributor Author

oech3 commented May 21, 2026 via email

@xtqqczze
Copy link
Copy Markdown
Contributor

Stream does NOT mean it is pipe. Please remove PipeReader.

copy_stream(&mut pipe_read, &mut dest_file).unwrap();

@oech3
Copy link
Copy Markdown
Contributor Author

oech3 commented May 21, 2026 via email

@oech3 oech3 force-pushed the flush-after-splice branch from feb0c58 to 96c1155 Compare May 21, 2026 08:10
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.

2 participants