Skip to content

Commit a05acbf

Browse files
committed
Comment flock usage on Linux
1 parent 564ebbb commit a05acbf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/librustc_data_structures/flock.rs

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ use std::io;
1212
use std::path::Path;
1313

1414
cfg_if! {
15+
// We use `flock` rather than `fcntl` on Linux, because WSL1 does not support
16+
// `fcntl`-style advisory locks properly (rust-lang/rust#72157).
17+
//
18+
// For other Unix targets we still use `fcntl` because it's more portable than
19+
// `flock`.
1520
if #[cfg(target_os = "linux")] {
1621
use std::os::unix::prelude::*;
1722

0 commit comments

Comments
 (0)