MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / stopServer

Function stopServer

graph-ui/tools/lib/cbm-server.mjs:163–173  ·  view source on GitHub ↗
(child, label = 'C-Server')

Source from the content-addressed store, hash-verified

161
162/** Den Prozess beenden, erst hoeflich und dann nicht mehr. */
163export async function stopServer(child, label = 'C-Server') {
164 if (!child || child.exitCode !== null || child.killed) { return; }
165 child.kill('SIGTERM');
166 for (let i = 0; i < 50; i += 1) {
167 if (child.exitCode !== null || child.signalCode !== null) { return; }
168 await sleep(100);
169 }
170 console.error(`[smoke] ${label} reagierte nicht auf SIGTERM, sende SIGKILL`);
171 child.kill('SIGKILL');
172 await sleep(300);
173}

Callers

nothing calls this directly

Calls 1

sleepFunction · 0.70

Tested by

no test coverage detected