MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / CtrlHandler

Function CtrlHandler

3rdparty/minitrace/minitrace.cpp:113–120  ·  view source on GitHub ↗

Ctrl+C handling for Windows console apps

Source from the content-addressed store, hash-verified

111
112// Ctrl+C handling for Windows console apps
113static BOOL WINAPI CtrlHandler(DWORD fdwCtrlType) {
114 if (is_tracing && fdwCtrlType == CTRL_C_EVENT) {
115 printf("Ctrl-C detected! Flushing trace and shutting down.\n\n");
116 mtr_flush();
117 mtr_shutdown();
118 }
119 ExitProcess(1);
120}
121
122void mtr_register_sigint_handler() {
123 // For console apps:

Callers

nothing calls this directly

Calls 2

mtr_flushFunction · 0.85
mtr_shutdownFunction · 0.85

Tested by

no test coverage detected