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

Function worker_tmp_path

src/mcp/index_supervisor.c:135–145  ·  view source on GitHub ↗

Resolve a per-run temp path /logs/.worker- . */

Source from the content-addressed store, hash-verified

133
134/* Resolve a per-run temp path <cache_dir>/logs/.worker-<pid><suffix>. */
135static void worker_tmp_path(char *out, size_t out_sz, int pid, const char *suffix) {
136 const char *cdir = cbm_resolve_cache_dir();
137 if (cdir && cdir[0]) {
138 char dir[900];
139 snprintf(dir, sizeof(dir), "%s/logs", cdir);
140 cbm_mkdir_p(dir, 0755);
141 snprintf(out, out_sz, "%s/.worker-%d%s", dir, pid, suffix);
142 } else {
143 snprintf(out, out_sz, ".worker-%d%s", pid, suffix);
144 }
145}
146
147int cbm_index_spawn_worker(const char *args_json, bool single_thread, const char *marker_file,
148 const char *quarantine_file, cbm_index_worker_result_t *result) {

Callers 1

cbm_index_spawn_workerFunction · 0.85

Calls 2

cbm_resolve_cache_dirFunction · 0.85
cbm_mkdir_pFunction · 0.85

Tested by

no test coverage detected