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

cargo locking doesn't work on Solaris #11421

Closed
psumbera opened this issue Nov 25, 2022 · 2 comments · Fixed by #11439
Closed

cargo locking doesn't work on Solaris #11421

psumbera opened this issue Nov 25, 2022 · 2 comments · Fixed by #11439
Labels
A-filesystem Area: issues with filesystems C-bug Category: bug O-solaris OS: Oracle Solaris

Comments

@psumbera
Copy link
Contributor

Problem

As described in https://bugzilla.mozilla.org/show_bug.cgi?id=1802095#c5 cargo locking doesn't work on Solaris:

"normally, running cargo twice in the same workspace will make one of them wait for the other".

Can you please point me to relevant peace of code? Maybe it's related to missing flock() system call on Solaris?!

Steps

No response

Possible Solution(s)

No response

Notes

No response

Version

No response

@psumbera psumbera added the C-bug Category: bug label Nov 25, 2022
@glandium
Copy link
Contributor

glandium commented Nov 25, 2022

Erf

#[cfg(target_os = "solaris")]
fn flock(file: &File, flag: libc::c_int) -> Result<()> {
// Solaris lacks flock(), so simply succeed with a no-op
Ok(())
}

@glandium
Copy link
Contributor

@weihanglo weihanglo added A-build-dependencies Area: [build-dependencies] A-build-execution Area: anything dealing with executing the compiler A-filesystem Area: issues with filesystems O-solaris OS: Oracle Solaris and removed A-build-dependencies Area: [build-dependencies] A-build-execution Area: anything dealing with executing the compiler labels Nov 25, 2022
psumbera added a commit to psumbera/cargo that referenced this issue Nov 29, 2022
bors added a commit that referenced this issue Dec 3, 2022
Implements cargo file locking using fcntl on Solaris.

Fixes #11421.
@bors bors closed this as completed in acd9aa3 Dec 3, 2022
psumbera added a commit to psumbera/cargo that referenced this issue Dec 12, 2022
bors added a commit that referenced this issue Dec 12, 2022
Fixes flock(fd, LOCK_UN) emulation on Solaris.

Follow up fix for #11421.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-filesystem Area: issues with filesystems C-bug Category: bug O-solaris OS: Oracle Solaris
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants