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

Function tf_setup_cache_sentinel

tests/test_main.c:168–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168static bool tf_setup_cache_sentinel(void) {
169 snprintf(tf_home_sentinel, sizeof(tf_home_sentinel), "/tmp/cbm-test-home-XXXXXX");
170 if (!cbm_mkdtemp(tf_home_sentinel)) {
171 return false;
172 }
173 /* Legacy integration fixtures derive DB paths from HOME, while production
174 * cache_dir() prefers CBM_CACHE_DIR. A private HOME plus no inherited cache
175 * override keeps both conventions pointed at the same isolated tree. */
176 cbm_setenv("HOME", tf_home_sentinel, 1);
177 cbm_unsetenv("CBM_CACHE_DIR");
178 atexit(tf_cleanup_cache_sentinel);
179 return true;
180}
181
182/* Fast real-process probes for the async index-supervisor contract. They run
183 * only in a child admitted by the exact build-bound worker grammar. */

Callers 1

mainFunction · 0.85

Calls 3

cbm_mkdtempFunction · 0.85
cbm_setenvFunction · 0.85
cbm_unsetenvFunction · 0.85

Tested by

no test coverage detected