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

Function termination_handler

3rdparty/minitrace/minitrace.cpp:156–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154
155static void termination_handler(int signum) ATTR_NORETURN;
156static void termination_handler(int signum) {
157 (void) signum;
158 if (is_tracing) {
159 printf("Ctrl-C detected! Flushing trace and shutting down.\n\n");
160 mtr_flush();
161 fwrite("\n]}\n", 1, 4, f);
162 fclose(f);
163 }
164 exit(1);
165}
166
167void mtr_register_sigint_handler() {
168#ifndef MTR_ENABLED

Callers

nothing calls this directly

Calls 1

mtr_flushFunction · 0.85

Tested by

no test coverage detected