INNER CODE UNIT · TypeScript

close

openai/codex-security · plugins/codex-security/mcp-app/main.ts:12

  const close = async (exitCode?: number): Promise<void> => {
    if (closing) return;
    closing = true;
    if (exitCode !== undefined) process.exitCode = exitCode;
    await server.close().catch((error: unknown) => {
      console.error(
        artifactWriter
          ? "Codex Security artifact writer failed to close:"
          : "Codex Security MCP server failed to close:",
        error,
      );
    });
  };
  process.stdin.once("end", () => void close());
  process.once("SIGINT", () => void close(130));
  process.once("SIGTERM", () => void close(143));
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…