Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect when statx isn't available on older versions of Docker. #357

Merged
merged 5 commits into from
Jun 13, 2022

Conversation

sunfishcode
Copy link
Member

In older versions of Docker, statx can fail with EPERM meaning it
isn't available. Recognize this, and translate it into ENOSYS. Also,
have statx remember this and fail quickly in future calls.

This is more emulation than rustix usually likes to do, but in this
case, this is the behavior seems likely to be what most users will
want, and we might as well put the code in one place.

Fixes #352.

In older versions of Docker, `statx` can fail with `EPERM` meaning it
isn't available. Recognize this, and translate it into `ENOSYS`. Also,
have `statx` remember this and fail quickly in future calls.

This is more emulation than rustix usually likes to do, but in this
case, this is the behavior seems likely to be what most users will
want, and we might as well put the code in one place.

Fixes #352.
@sunfishcode sunfishcode force-pushed the sunfishcode/is-statx-available branch from 860d7a0 to 19832e2 Compare June 7, 2022 12:51
@sunfishcode sunfishcode merged commit 8994c30 into main Jun 13, 2022
@sunfishcode sunfishcode deleted the sunfishcode/is-statx-available branch June 13, 2022 18:47
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.

Detect statx support properly in Docker
1 participant