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

Function waitForExit

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

Source from the content-addressed store, hash-verified

291 const transport = new StdioServerTransport();
292
293 const waitForExit = () =>
294 new Promise<void>((resolve) => {
295 const finish = () => {
296 process.off("SIGINT", finish);
297 process.off("SIGTERM", finish);
298 process.stdin.off("end", finish);
299 process.stdin.off("close", finish);
300 resolve();
301 };
302 process.once("SIGINT", finish);
303 process.once("SIGTERM", finish);
304 process.stdin.once("end", finish);
305 process.stdin.once("close", finish);
306 });
307
308 // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: stdio server lifetime uses Promise-based SDK/process APIs and always closes resources
309 try {

Callers 1

runMcpStdioServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected