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

Function waitForExit

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

Source from the content-addressed store, hash-verified

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

Callers 1

runMcpStdioServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected