MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / sigint_handler

Function sigint_handler

tools/completion/completion.cpp:67–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65
66#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) || defined (_WIN32)
67static void sigint_handler(int signo) {
68 if (signo == SIGINT) {
69 if (!is_interacting && g_params->interactive) {
70 is_interacting = true;
71 need_insert_eot = true;
72 } else {
73 console::cleanup();
74 LOG("\n");
75 common_perf_print(*g_ctx, *g_smpl);
76
77 // make sure all logs are flushed
78 LOG("Interrupted by user\n");
79 common_log_pause(common_log_main());
80
81 _exit(130);
82 }
83 }
84}
85#endif
86
87int main(int argc, char ** argv) {

Callers 1

mainFunction · 0.70

Calls 4

cleanupFunction · 0.85
common_perf_printFunction · 0.85
common_log_pauseFunction · 0.85
common_log_mainFunction · 0.85

Tested by

no test coverage detected