Skip to content

yes: no hang with fcntl failure#12254

Open
oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:yes-p
Open

yes: no hang with fcntl failure#12254
oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:yes-p

Conversation

@oech3
Copy link
Copy Markdown
Contributor

@oech3 oech3 commented May 12, 2026

Don't hang with strace -o /dev/null -e inject=fcntl:error=ENOSYS yes by checking pipe size. The error does not appear on the daily usage. But it should be avoided. It was accidentally avoided by incorrect assumption for stdout.

This bypasses File::from of uucore::pipes::pipe. So use RawWriter to allow using write_all.

Checking pipe size is not required for other splice(2)ing utils.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/cut/bounded-memory (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/printf/printf-surprise is now passing!

@oech3 oech3 force-pushed the yes-p branch 3 times, most recently from 6d4eded to 86c0a0d Compare May 12, 2026 11:03
@oech3 oech3 marked this pull request as ready for review May 12, 2026 11:23
@xtqqczze
Copy link
Copy Markdown
Contributor

Why do we call fcntl_setpipe_size three times?

Comment thread src/uu/yes/src/yes.rs
@oech3

This comment was marked as resolved.

@oech3
Copy link
Copy Markdown
Contributor Author

oech3 commented May 12, 2026

Is File guaranteed that is unbuffered?

@xtqqczze
Copy link
Copy Markdown
Contributor

It is documented that std::fs::File does not buffer reads and writes.

Comment thread src/uucore/src/lib/features/pipes.rs
@oech3

This comment was marked as off-topic.

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