Skip to content

Commit 571f3ed

Browse files
committed
bootstrap: Handle bootstrap lockfile race condition better
1 parent 8231e85 commit 571f3ed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: src/bootstrap/src/bin/main.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ fn main() {
5757
}
5858
err => {
5959
drop(err);
60-
if let Ok(pid) = pid {
60+
// #135972: We can reach this point when the lock has been taken,
61+
// but the locker has not yet written its PID to the file
62+
if let Some(pid) = pid.ok().filter(|pid| !pid.is_empty()) {
6163
println!("WARNING: build directory locked by process {pid}, waiting for lock");
6264
} else {
6365
println!("WARNING: build directory locked, waiting for lock");

0 commit comments

Comments
 (0)