MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / sigint_handler

Function sigint_handler

subprojects/llama.cpp/tools/mtmd/mtmd-cli.cpp:52–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.70

Calls 1

cleanupFunction · 0.85

Tested by

no test coverage detected