sync: Reset O_NONBLOCK flag after file validation to match GNU behavior#9437
Merged
sylvestre merged 2 commits intouutils:mainfrom Jan 18, 2026
Merged
sync: Reset O_NONBLOCK flag after file validation to match GNU behavior#9437sylvestre merged 2 commits intouutils:mainfrom
sylvestre merged 2 commits intouutils:mainfrom
Conversation
10 tasks
9ac5413 to
75a3e0c
Compare
|
GNU testsuite comparison: |
75a3e0c to
05612a4
Compare
|
GNU testsuite comparison: |
Contributor
|
Could you please add a test for this? |
05612a4 to
6840348
Compare
|
GNU testsuite comparison: |
83f162c to
e9622ed
Compare
e9622ed to
3577f24
Compare
CodSpeed Performance ReportMerging #9437 will not alter performanceComparing Summary
Footnotes
|
|
GNU testsuite comparison: |
2cd26a2 to
e1c9873
Compare
|
GNU testsuite comparison: |
e1c9873 to
3577f24
Compare
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
mattsu2020
pushed a commit
to mattsu2020/coreutils
that referenced
this pull request
Jan 23, 2026
sync: Reset O_NONBLOCK flag after file validation to match GNU behavior
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds proper flag reset logic to the
syncutility to align with GNU coreutils implementation.Changes
O_NONBLOCKflag before callingsyncfs()andfdatasync()fcntl,FcntlArg,OFlag, andAsRawFdThe implementation ensures proper handling of non-blocking file descriptors before performing synchronization operations.
https://www.gnu.org/software/coreutils/manual/html_node/sync-invocation.html