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

Function idxfailclosed_self_path

tests/test_mcp.c:21768–21787  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21766}
21767
21768static bool idxfailclosed_self_path(char out[CBM_SZ_4K]) {
21769#ifdef __APPLE__
21770 int length = proc_pidpath(getpid(), out, CBM_SZ_4K);
21771 bool resolved = length > 0 && length < CBM_SZ_4K;
21772 if (resolved) {
21773 out[length] = '\0';
21774 }
21775 return resolved;
21776#elif defined(__linux__)
21777 ssize_t length = readlink("/proc/self/exe", out, CBM_SZ_4K - 1);
21778 bool resolved = length > 0 && length < (ssize_t)CBM_SZ_4K - 1;
21779 if (resolved) {
21780 out[length] = '\0';
21781 }
21782 return resolved;
21783#else
21784 (void)out;
21785 return false;
21786#endif
21787}
21788#endif
21789
21790TEST(index_supervisor_start_failure_is_fail_closed_in_real_host) {

Callers 1

test_mcp.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected