Skip to content

Conversation

@naoNao89
Copy link
Contributor

This PR adds proper flag reset logic to the sync utility to align with GNU coreutils implementation.

Changes

  • Reset O_NONBLOCK flag before calling syncfs() and fdatasync()
  • Added necessary imports: fcntl, FcntlArg, OFlag, and AsRawFd
  • Applies to Linux/Android platforms only

The 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

@naoNao89 naoNao89 force-pushed the sync-remove-unwrap branch 2 times, most recently from 9ccd94f to 9ac5413 Compare November 21, 2025 14:07
@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

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.

1 participant