MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / sigint_handler

Function sigint_handler

examples/main/main.cpp:88–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86
87#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) || defined (_WIN32)
88static void sigint_handler(int signo) {
89 if (signo == SIGINT) {
90 if (!is_interacting) {
91 is_interacting = true;
92 } else {
93 console::cleanup();
94 printf("\n");
95 llama_print_timings(*g_ctx);
96 write_logfile(*g_ctx, *g_params, *g_model, *g_input_tokens, g_output_ss->str(), *g_output_tokens);
97 _exit(130);
98 }
99 }
100}
101#endif
102
103int main(int argc, char ** argv) {

Callers 1

mainFunction · 0.70

Calls 5

printfFunction · 0.85
llama_print_timingsFunction · 0.85
write_logfileFunction · 0.70
cleanupFunction · 0.50
strMethod · 0.45

Tested by

no test coverage detected