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

Function waitForExit

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

Source from the content-addressed store, hash-verified

336 const transport = new StdioServerTransport();
337
338 const waitForExit = () =>
339 new Promise<void>((resolve) => {
340 const finish = () => {
341 process.off("SIGINT", finish);
342 process.off("SIGTERM", finish);
343 process.stdin.off("end", finish);
344 process.stdin.off("close", finish);
345 resolve();
346 };
347 process.once("SIGINT", finish);
348 process.once("SIGTERM", finish);
349 process.stdin.once("end", finish);
350 process.stdin.once("close", finish);
351 });
352
353 // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: stdio server lifetime uses Promise-based SDK/process APIs and always closes resources
354 try {

Callers 1

runMcpStdioServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected