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

Implement fcntl_getlk #1077

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Implement fcntl_getlk #1077

wants to merge 1 commit into from

Conversation

al8n
Copy link
Contributor

@al8n al8n commented Jun 17, 2024

Solve #1076

@al8n al8n force-pushed the main branch 3 times, most recently from 0ead0de to 600f50c Compare June 17, 2024 09:23
Comment on lines +1102 to +1109
l_type: F_WRLCK as _,

// When `l_len` is zero, this locks all the bytes from
// `l_whence`/`l_start` to the end of the file, even as the
// file grows dynamically.
l_whence: SEEK_SET as _,
l_start: 0,
l_len: 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be nice to give the user control over these fields via parameters to the function call.

Copy link
Member

Choose a reason for hiding this comment

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

I agree that it'd be nice to expose this functionality, however the existing fcntl_lock doesn't currently give the user control over these flags either, so this is ok for now.

@sunfishcode
Copy link
Member

Overall this looks good, though there are some test failures that look relevant.

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.

3 participants