MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / spawnOnce

Function spawnOnce

e2e/src/vm/ec2.ts:361–378  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

359 let child: ReturnType<typeof import("node:child_process").spawn> | undefined;
360 const { spawn } = await import("node:child_process");
361 const spawnOnce = (): void => {
362 child = spawn(
363 "ssh",
364 [
365 "-i",
366 keyPath,
367 ...SSH_OPTS,
368 "-N",
369 "-L",
370 `${localPort}:127.0.0.1:${guestPort}`,
371 `${user}@${ip}`,
372 ],
373 { stdio: "ignore" },
374 );
375 child.on("exit", () => {
376 if (!closed) setTimeout(spawnOnce, 2000);
377 });
378 };
379 spawnOnce();
380 const close = (): void => {
381 closed = true;

Callers 1

ec2VmFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected