Skip to content

Add flock support for cygwin - #145673

Merged
bors merged 1 commit into
rust-lang:masterfrom
Berrysoft:cygwin-fix-flock
Aug 21, 2025
Merged

Add flock support for cygwin#145673
bors merged 1 commit into
rust-lang:masterfrom
Berrysoft:cygwin-fix-flock

Conversation

@Berrysoft

Copy link
Copy Markdown
Contributor

See discussion: #145534 (comment)

cc: @jeremyd2019

@rustbot

Copy link
Copy Markdown
Collaborator

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

@rustbotrustbot 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

jeremyd2019 commented Aug 20, 2025

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

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

jeremyd2019 commented Aug 20, 2025

Copy link
Copy Markdown
Contributor

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

@joshtriplett

Copy link
Copy Markdown
Member

@bors r+ rollup

@bors

bors commented Aug 21, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit cadb56d has been approved by joshtriplett

It is now in the queue for this repository.

@borsbors 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
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 21, 2025
…triplett
Add flock support for cygwin
See discussion: rust-lang#145534 (comment)
cc: `@jeremyd2019`
This was referenced Aug 21, 2025
bors added a commit that referenced this pull request Aug 21, 2025
Rollup of 19 pull requests
Successful merges:
- #143383 (stabilize `const_array_each_ref`)
- #144758 ([Doc] Add links to the various collections)
- #144915 (Defer tail call ret ty equality to check_tail_calls)
- #145256 (Add new `--test-codegen-backend` bootstrap option)
- #145297 (fix(debuginfo): handle false positives in overflow check)
- #145390 (Shorten some dependency chains in the compiler)
- #145415 (std_detect: RISC-V: implement implication to "C")
- #145525 (stdlib: Replace typedef -> type alias in doc comment)
- #145590 (Prevent impossible combinations in `ast::ModKind`.)
- #145593 (UnsafePinned::raw_get: sync signature with get)
- #145621 (Fix some doc typos)
- #145627 (Unconditionally-const supertraits are considered not dyn compatible)
- #145642 (Do not use effective_visibilities query for Adt types of a local trait while proving a where-clause)
- #145650 (Fix JS search scripts path)
- #145654 (Download CI GCC into the correct directory)
- #145662 (Enforce correct number of arguments for `"x86-interrupt"` functions)
- #145673 (Add flock support for cygwin)
- #145674 (Enable triagebot `[review-changes-since]` feature)
- #145678 (Fix typo in docstring)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 018568f into rust-lang:masterAug 21, 2025
10 checks passed
@rustbotrustbot added this to the 1.91.0 milestone Aug 21, 2025
rust-timer added a commit that referenced this pull request Aug 21, 2025
Rollup merge of #145673 - Berrysoft:cygwin-fix-flock, r=joshtriplett
Add flock support for cygwin
See discussion: #145534 (comment)
cc: ``@jeremyd2019``
@Berrysoft
Berrysoft deleted the cygwin-fix-flock branch August 21, 2025 14:29
github-actionsBot pushed a commit to model-checking/verify-rust-std that referenced this pull request Aug 26, 2025
…triplett
Add flock support for cygwin
See discussion: rust-lang#145534 (comment)
cc: ``@jeremyd2019``
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-libsRelevant 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

@Berrysoft@rustbot@jeremyd2019@joshtriplett@bors@ibraheemdev