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

Function stopDaemon

e2e/desktop/sidecar-attach-conflict.test.ts:99–112  ·  view source on GitHub ↗
(child: ChildProcess | undefined)

Source from the content-addressed store, hash-verified

97 });
98
99const stopDaemon = async (child: ChildProcess | undefined): Promise<void> => {
100 if (!child || child.exitCode !== null || child.signalCode !== null) return;
101 await new Promise<void>((resolve) => {
102 const timeout = setTimeout(() => {
103 child.kill("SIGKILL");
104 resolve();
105 }, 5_000);
106 child.once("exit", () => {
107 clearTimeout(timeout);
108 resolve();
109 });
110 child.kill("SIGTERM");
111 });
112};
113
114scenario(
115 "Desktop · attaches to a CLI daemon that already owns the data dir instead of wedging",

Callers 1

runFunction · 0.70

Calls 2

killMethod · 0.80
resolveFunction · 0.50

Tested by

no test coverage detected