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

Function sigint_handler

examples/infill/infill.cpp:89–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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