Stop --chdir from binding the working directory read-write

This commit is contained in:
2026-11-17 20:37:01 +01:00
parent 352ead2bf5
commit 4b801f811e
8 changed files with 72 additions and 21 deletions
+2 -1
View File
@@ -171,9 +171,10 @@ fn interrupt_during_grace_period_kills_child_processes_at_once() {
}
fn spawn_sandbox(args: &[&str], dir: &Path, script: &str) -> (Sandbox, Child) {
let dir = dir.to_str().unwrap();
let mut sandbox = Sandbox::new(args);
let child = sandbox
.args(["--chdir", dir.to_str().unwrap(), "--", "sh", "-c", script])
.args(["--rw", dir, "--chdir", dir, "--", "sh", "-c", script])
.stdout(Stdio::null())
.spawn()
.expect("agent-sandbox binary failed to execute");