MCPcopy Create free account
hub / github.com/FastLED/FastLED / end_crash_dump

Method end_crash_dump

tests/crash_handler_win.h:89–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 }
88
89 void end_crash_dump() {
90 fflush(stdout);
91 if (saved_stdout_fd >= 0) {
92 _dup2(saved_stdout_fd, _fileno(stdout));
93 _close(saved_stdout_fd);
94 saved_stdout_fd = -1;
95 }
96 if (crash_dump_fd >= 0) {
97 _close(crash_dump_fd);
98 crash_dump_fd = -1;
99 }
100 // Now stdout is back to console - print the dump to console too
101 FILE* dump = fopen(crash_dump_path, "r");
102 if (dump) {
103 char buf[512];
104 while (fgets(buf, sizeof(buf), dump)) {
105 fputs(buf, stdout);
106 }
107 fclose(dump);
108 }
109 // Print marker so AI agents / test harness can find the dump
110 printf("\n[CRASH_DUMP_FILE: %s]\n", crash_dump_path);
111 fflush(stdout);
112 }
113
114 // --- Symbol helpers ---
115

Callers 2

Calls 4

fflushFunction · 0.85
fopenFunction · 0.85
fcloseFunction · 0.85
printfFunction · 0.85

Tested by

no test coverage detected