From 1fdde9e41eb6fca0bf4c05f2c7375fb48fa4052f Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Fri, 26 Jan 2024 10:26:03 +0000 Subject: [PATCH] fixup cedc0376fff7413d67dec7b2ca5a8a93d608d213 --- control_plane/src/endpoint.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/control_plane/src/endpoint.rs b/control_plane/src/endpoint.rs index 207cc8b449..dcad22b992 100644 --- a/control_plane/src/endpoint.rs +++ b/control_plane/src/endpoint.rs @@ -584,7 +584,7 @@ impl Endpoint { let child = cmd.spawn()?; // set up a scopeguard to kill & wait for the child in case we panic or bail below - let child = scopeguard::guard(spawned_process, |mut child| { + let child = scopeguard::guard(child, |mut child| { println!("SIGKILL & wait the started process"); (|| { // TODO: use another signal that can be caught by the child so it can clean up any children it spawned @@ -592,7 +592,7 @@ impl Endpoint { child.wait().context("wait() for child process")?; anyhow::Ok(()) })() - .with_context(|| format!("scopeguard kill&wait child {process_name:?}")) + .with_context(|| format!("scopeguard kill&wait child {child:?}")) .unwrap(); });