MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / handler

Method handler

apps/kimi-code/src/tui/kimi-tui.ts:824–839  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

822
823 for (const signal of signals) {
824 const handler = (): void => {
825 if (signal === 'SIGHUP') {
826 this.emergencyTerminalExit();
827 return;
828 }
829 // Registering a SIGTERM listener disables Node's default exit(143),
830 // so we must reinstate it after stop() or on failure.
831 this.stop(143).then(
832 () => {
833 process.exit(143);
834 },
835 () => {
836 this.emergencyTerminalExit(143);
837 },
838 );
839 };
840 process.prependListener(signal, handler);
841 this.signalCleanupHandlers.push(() => {
842 process.off(signal, handler);

Callers

nothing calls this directly

Calls 3

emergencyTerminalExitMethod · 0.95
stopMethod · 0.95
exitMethod · 0.65

Tested by

no test coverage detected