From e24b05c7da88c823d1544976f0d9189994b94fe0 Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Sun, 25 May 2025 18:26:15 -0700 Subject: [PATCH] fix(container-runner): fix leaked pipes --- .../edge/infra/client/container-runner/src/container.rs | 2 ++ .../infra/client/container-runner/tests/common/setup.rs | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/packages/edge/infra/client/container-runner/src/container.rs b/packages/edge/infra/client/container-runner/src/container.rs index 3a9248079b..4c1e8fbe1e 100644 --- a/packages/edge/infra/client/container-runner/src/container.rs +++ b/packages/edge/infra/client/container-runner/src/container.rs @@ -93,6 +93,8 @@ pub fn run( .arg("--all") .arg(&actor_id) .arg("SIGTERM") + .stdout(Stdio::null()) + .stderr(Stdio::null()) .status(); println!("runc kill status: {:?}", status); break; diff --git a/packages/edge/infra/client/container-runner/tests/common/setup.rs b/packages/edge/infra/client/container-runner/tests/common/setup.rs index 37677ab7f2..24c7a72d2e 100644 --- a/packages/edge/infra/client/container-runner/tests/common/setup.rs +++ b/packages/edge/infra/client/container-runner/tests/common/setup.rs @@ -24,6 +24,8 @@ impl Setup { pub fn signal_child(&self, signal: &str) { let kill = Command::new("kill") .args(["-s", signal, &self.child.id().to_string()]) + .stdout(std::process::Stdio::null()) + .stderr(std::process::Stdio::null()) .status() .unwrap(); assert!(kill.success()); @@ -37,6 +39,8 @@ impl Drop for Setup { .arg("delete") .arg("--force") .arg(&self.actor_id) + .stdout(std::process::Stdio::null()) + .stderr(std::process::Stdio::null()) .status() .unwrap(); @@ -64,6 +68,8 @@ pub fn setup(command: &str) -> Setup { .arg("docker://debian:12.4") .arg("oci:oci-image:latest") .current_dir(actor_dir.path()) + .stdout(std::process::Stdio::null()) + .stderr(std::process::Stdio::null()) .status() .unwrap(); assert!(status.success()); @@ -74,6 +80,8 @@ pub fn setup(command: &str) -> Setup { .arg("oci-image:latest") .arg("fs") .current_dir(actor_dir.path()) + .stdout(std::process::Stdio::null()) + .stderr(std::process::Stdio::null()) .status() .unwrap(); assert!(status.success());