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

Function waitForExit

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

Source from the content-addressed store, hash-verified

395 );
396
397 const waitForExit = () =>
398 new Promise<void>((resolve) => {
399 const finish = () => {
400 process.off("SIGINT", finish);
401 process.off("SIGTERM", finish);
402 process.stdin.off("end", finish);
403 process.stdin.off("close", finish);
404 resolve();
405 };
406 process.once("SIGINT", finish);
407 process.once("SIGTERM", finish);
408 process.stdin.once("end", finish);
409 process.stdin.once("close", finish);
410 });
411
412 // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: stdio server lifetime uses Promise-based SDK/process APIs and always closes resources
413 try {

Callers 1

runMcpStdioServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected