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

Function application_max_restarts

src/daemon/application.c:795–805  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

793}
794
795static int application_max_restarts(void) {
796 char value[32] = {0};
797 if (!cbm_safe_getenv("CBM_INDEX_MAX_RESTARTS", value, sizeof(value), NULL) || !value[0]) {
798 return APPLICATION_DEFAULT_MAX_RESTARTS;
799 }
800 char *end = NULL;
801 long parsed = strtol(value, &end, 10);
802 return end && *end == '\0' && parsed > 0 && parsed <= INT_MAX
803 ? (int)parsed
804 : APPLICATION_DEFAULT_MAX_RESTARTS;
805}
806
807static void application_attempt_init(application_attempt_t *attempt) {
808 memset(attempt, 0, sizeof(*attempt));

Callers 1

application_job_recoverFunction · 0.85

Calls 1

cbm_safe_getenvFunction · 0.85

Tested by

no test coverage detected