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

Function waitForExit

apps/local/src/mcp.ts:316–329  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

314 const transport = new StdioServerTransport();
315
316 const waitForExit = () =>
317 new Promise<void>((resolve) => {
318 const finish = () => {
319 process.off("SIGINT", finish);
320 process.off("SIGTERM", finish);
321 process.stdin.off("end", finish);
322 process.stdin.off("close", finish);
323 resolve();
324 };
325 process.once("SIGINT", finish);
326 process.once("SIGTERM", finish);
327 process.stdin.once("end", finish);
328 process.stdin.once("close", finish);
329 });
330
331 // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: stdio server lifetime uses Promise-based SDK/process APIs and always closes resources
332 try {

Callers 1

runMcpStdioServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected