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

Function stopProcess

e2e/desktop-packaged/supervised-attach.test.ts:313–326  ·  view source on GitHub ↗
(child: ChildProcess | undefined)

Source from the content-addressed store, hash-verified

311};
312
313const stopProcess = async (child: ChildProcess | undefined): Promise<void> => {
314 if (!child || child.exitCode !== null || child.signalCode !== null) return;
315 await new Promise<void>((resolve) => {
316 const timeout = setTimeout(() => {
317 child.kill("SIGKILL");
318 resolve();
319 }, 5_000);
320 child.once("exit", () => {
321 clearTimeout(timeout);
322 resolve();
323 });
324 child.kill("SIGTERM");
325 });
326};
327
328const closePackaged = async (app: PackagedApp | undefined): Promise<void> => {
329 app?.cdp.close();

Callers 2

closePackagedFunction · 0.70
runFunction · 0.70

Calls 1

resolveFunction · 0.50

Tested by

no test coverage detected