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

Function host_log_close

src/daemon/host.c:162–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162static void host_log_close(void) {
163 cbm_log_set_sink(NULL);
164 if (g_host_log_mutex_initialized) {
165 cbm_mutex_lock(&g_host_log_mutex);
166 }
167 FILE *file = g_host_log_file;
168 g_host_log_file = NULL;
169 if (file) {
170 (void)fclose(file);
171 }
172 if (g_host_log_mutex_initialized) {
173 cbm_mutex_unlock(&g_host_log_mutex);
174 cbm_mutex_destroy(&g_host_log_mutex);
175 g_host_log_mutex_initialized = false;
176 }
177}
178
179static uint64_t host_deadline_after(uint32_t timeout_ms) {
180 uint64_t now = cbm_now_ms();

Callers 1

cbm_daemon_host_runFunction · 0.85

Calls 4

cbm_log_set_sinkFunction · 0.85
cbm_mutex_lockFunction · 0.85
cbm_mutex_unlockFunction · 0.85
cbm_mutex_destroyFunction · 0.85

Tested by

no test coverage detected