MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / diag_directory_close

Function diag_directory_close

src/foundation/diagnostics.c:232–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232static void diag_directory_close(bool remove_directory) {
233#ifndef _WIN32
234 if (g_diag_directory_fd >= 0) {
235 (void)close(g_diag_directory_fd);
236 g_diag_directory_fd = -1;
237 }
238#endif
239 cbm_private_lock_directory_close(g_diag_directory);
240 g_diag_directory = NULL;
241 if (remove_directory && g_diag_directory_path[0] != '\0') {
242 (void)cbm_rmdir(g_diag_directory_path);
243 }
244}
245
246/* Diagnostics placement honors the documented contract ($TMPDIR, /tmp
247 * fallback) without touching cbm_tmpdir(), whose many other callers keep

Callers 4

diag_directory_prepareFunction · 0.85
cbm_diag_startFunction · 0.85
cbm_diag_stopFunction · 0.85

Calls 2

cbm_rmdirFunction · 0.85

Tested by

no test coverage detected