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

Function sigint_handler

smallthinker/tools/mtmd/mtmd-cli.cpp:51–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) || defined (_WIN32)
51static void sigint_handler(int signo) {
52 if (signo == SIGINT) {
53 if (g_is_generating) {
54 g_is_generating = false;
55 } else {
56 console::cleanup();
57 if (g_is_interrupted) {
58 _exit(1);
59 }
60 g_is_interrupted = true;
61 }
62 }
63}
64#endif
65
66struct mtmd_cli_context {

Callers 1

mainFunction · 0.70

Calls 1

cleanupFunction · 0.50

Tested by

no test coverage detected