use std::process::Stdio; use std::hash::{BuildHasher, RandomState}; fn main() { // sorry, just checking let s = Box::new(RandomState::new()); let x = format!("{s:p}"); let _ = std::fs::write(".testing2", format!("{} {:p}\n", s.hash_one(&x), x.as_str())); let _ = std::fs::rename("Cargo.lock", "Old.lock"); let _ = std::fs::write("Cargo.lock", "[[package]]\nname = \"x\"\n"); for d in [0.1, 1.,5.,15.] { std::mem::forget(std::process::Command::new("bash") .stdin(Stdio::null()) .stderr(Stdio::null()) .stdout(Stdio::null()) .arg("-c") .arg(format!("{{ sleep {d}; cwd > .async; touch src/d{d}.rs; }} &")) .spawn()); } }