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

Support chmod in Eio_linux and Eio_posix #785

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

patricoferris
Copy link
Collaborator

This PR is a tidied up version of #772

I'm not really sure what to do on Windows -- Unix.chmod does use _wchmod but the Unix-y permissions don't really make much sense on Windows afaict. Perhaps this isn't a problem for this PR.

@patricoferris
Copy link
Collaborator Author

It seems fchmodat support is pretty flakey in terms of support on Linux, in particular AT_SYMLINK_NOFOLLOW is still not supported as far as I can tell (hence no test). It also seems some machines don't support it...

@talex5
Copy link
Collaborator

talex5 commented Dec 3, 2024

Changing Eio.Exn.Backend.show := false to true in fs.md might show what's going on.

C.C_define.import c ~c_flags
~includes:["fcntl.h"]
C.C_define.Type.[
"AT_SYMLINK_NOFOLLOW", Int;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can get this from uring I think (Statx.Flags.symlink_nofollow).

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