Skip to content

Add flock support for cygwin #145673

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

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

Conversation

Berrysoft
Copy link
Contributor

See discussion: #145534 (comment)

cc: @jeremyd2019

@rustbot
Copy link
Collaborator

rustbot commented Aug 20, 2025

r? @ibraheemdev

rustbot has assigned @ibraheemdev.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 20, 2025
@jeremyd2019
Copy link
Contributor

jeremyd2019 commented Aug 20, 2025

OK, I was going to say, Cygwin supports several file locking APIs to choose from: flock, lockf, fcntl F_SETLKW and F_LCK_MANDATORY... Posix OFD locks are in process of being added for 3.7.0 I think

@Berrysoft
Copy link
Contributor Author

Well I chose the minimal change in this PR. Seems that libstd is using flock for all unix targets, and cygwin just supports it. Is there some concerns with flock in cygwin?

@jeremyd2019
Copy link
Contributor

jeremyd2019 commented Aug 20, 2025

no I was just confused that it said that try_lock was not supported when Cygwin implements so many locking apis 😁

@joshtriplett
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 21, 2025

📌 Commit cadb56d has been approved by joshtriplett

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants