diff --git a/src/plugins/aws/ssm/index.ts b/src/plugins/aws/ssm/index.ts index 2a505f0..d203f9c 100644 --- a/src/plugins/aws/ssm/index.ts +++ b/src/plugins/aws/ssm/index.ts @@ -191,6 +191,7 @@ const spawnSsmNode = async (options: { // child.kill() does not kill the entire process group, only the child process. If the child process has descendants, they will not be relinquished properly. The solution to this is to use a detached process and kill the entire process group when the parent process is killed. Consequently, we also need to intercept the SIGINT signal and send a kill signal using an AbortController to ensure all detached processes are killed when the parent process is killed. process.kill(-child.pid!); } + print2("SSH session terminated"); resolve(code); };