diff options
| author | Gary Guo <gary@garyguo.net> | 2020-05-21 01:10:52 +0100 |
|---|---|---|
| committer | Gary Guo <gary@garyguo.net> | 2020-05-21 01:10:52 +0100 |
| commit | a05acbf36f5a1f49919253281fc9bf9465606070 (patch) | |
| tree | b19ec5b8d6e4df10826d1bd0bc7ef5b7fb281910 /src/librustc_data_structures | |
| parent | 564ebbb0d19283894e87cd09333375aa0c84f8d9 (diff) | |
Comment flock usage on Linux
Diffstat (limited to 'src/librustc_data_structures')
| -rw-r--r-- | src/librustc_data_structures/flock.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/librustc_data_structures/flock.rs b/src/librustc_data_structures/flock.rs index 655248e0f52..9383be474fd 100644 --- a/src/librustc_data_structures/flock.rs +++ b/src/librustc_data_structures/flock.rs @@ -12,6 +12,11 @@ use std::io; use std::path::Path; cfg_if! { + // We use `flock` rather than `fcntl` on Linux, because WSL1 does not support + // `fcntl`-style advisory locks properly (rust-lang/rust#72157). + // + // For other Unix targets we still use `fcntl` because it's more portable than + // `flock`. if #[cfg(target_os = "linux")] { use std::os::unix::prelude::*; |
