Skip to content

Commit

Permalink
Comment flock usage on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
nbdd0121 committed May 21, 2020
1 parent 564ebbb commit a05acbf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/librustc_data_structures/flock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;

Expand Down

0 comments on commit a05acbf

Please sign in to comment.