mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 03:01:15 -03:00
Temporary workaround for #11933 on Cygwin
Without the sleep, `flock` sometimes returns an error 14 "bad addr". This puts the application into a deadlock.
This commit is contained in:
committed by
Johannes Altmanninger
parent
804bda5ba6
commit
372a65aa15
@@ -151,6 +151,10 @@ pub fn new(locking_mode: LockingMode, file_path: &wstr) -> std::io::Result<Self>
|
||||
return Err(err);
|
||||
}
|
||||
}
|
||||
#[cfg(cygwin)]
|
||||
// Prevents error 14 "Bad Addr" on Windows (#11933). If the error happens
|
||||
// the process appears deadlocked
|
||||
std::thread::sleep(std::time::Duration::from_nanos(1));
|
||||
|
||||
// Open the data file
|
||||
let data_file = wopen_cloexec(file_path, locking_mode.file_flags(), LOCKED_FILE_MODE)?;
|
||||
|
||||
Reference in New Issue
Block a user