Skip to content

Commit e24b05c

Browse files
NathanFlurryMasterPtato
authored andcommitted
fix(container-runner): fix leaked pipes
1 parent 08baa4f commit e24b05c

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

packages/edge/infra/client/container-runner/src/container.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ pub fn run(
9393
.arg("--all")
9494
.arg(&actor_id)
9595
.arg("SIGTERM")
96+
.stdout(Stdio::null())
97+
.stderr(Stdio::null())
9698
.status();
9799
println!("runc kill status: {:?}", status);
98100
break;

packages/edge/infra/client/container-runner/tests/common/setup.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ impl Setup {
2424
pub fn signal_child(&self, signal: &str) {
2525
let kill = Command::new("kill")
2626
.args(["-s", signal, &self.child.id().to_string()])
27+
.stdout(std::process::Stdio::null())
28+
.stderr(std::process::Stdio::null())
2729
.status()
2830
.unwrap();
2931
assert!(kill.success());
@@ -37,6 +39,8 @@ impl Drop for Setup {
3739
.arg("delete")
3840
.arg("--force")
3941
.arg(&self.actor_id)
42+
.stdout(std::process::Stdio::null())
43+
.stderr(std::process::Stdio::null())
4044
.status()
4145
.unwrap();
4246

@@ -64,6 +68,8 @@ pub fn setup(command: &str) -> Setup {
6468
.arg("docker://debian:12.4")
6569
.arg("oci:oci-image:latest")
6670
.current_dir(actor_dir.path())
71+
.stdout(std::process::Stdio::null())
72+
.stderr(std::process::Stdio::null())
6773
.status()
6874
.unwrap();
6975
assert!(status.success());
@@ -74,6 +80,8 @@ pub fn setup(command: &str) -> Setup {
7480
.arg("oci-image:latest")
7581
.arg("fs")
7682
.current_dir(actor_dir.path())
83+
.stdout(std::process::Stdio::null())
84+
.stderr(std::process::Stdio::null())
7785
.status()
7886
.unwrap();
7987
assert!(status.success());

0 commit comments

Comments
 (0)