File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,16 @@ fn compile_probe(rustc_bootstrap: bool) -> bool {
146146 // file in OUT_DIR, which causes nonreproducible builds in build systems
147147 // that treat the entire OUT_DIR as an artifact.
148148 if let Err ( err) = fs:: remove_dir_all ( & out_subdir) {
149- if err. kind ( ) != ErrorKind :: NotFound {
149+ // libc::ENOTEMPTY
150+ // Some filesystems (NFSv3) have timing issues under load where '.nfs*'
151+ // dummy files can continue to get created for a short period after the
152+ // probe command completes, breaking remove_dir_all.
153+ // To be replaced with ErrorKind::DirectoryNotEmpty (Rust 1.83+).
154+ const ENOTEMPTY : i32 = 39 ;
155+
156+ if !( err. kind ( ) == ErrorKind :: NotFound
157+ || ( cfg ! ( target_os = "linux" ) && err. raw_os_error ( ) == Some ( ENOTEMPTY ) ) )
158+ {
150159 eprintln ! ( "Failed to clean up {}: {}" , out_subdir. display( ) , err) ;
151160 process:: exit ( 1 ) ;
152161 }
You can’t perform that action at this time.
0 commit comments