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

Function application_max_restarts

src/daemon/application.c:1079–1089  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1077}
1078
1079static int application_max_restarts(void) {
1080 char value[32] = {0};
1081 if (!cbm_safe_getenv("CBM_INDEX_MAX_RESTARTS", value, sizeof(value), NULL) || !value[0]) {
1082 return APPLICATION_DEFAULT_MAX_RESTARTS;
1083 }
1084 char *end = NULL;
1085 long parsed = strtol(value, &end, 10);
1086 return end && *end == '\0' && parsed > 0 && parsed <= INT_MAX
1087 ? (int)parsed
1088 : APPLICATION_DEFAULT_MAX_RESTARTS;
1089}
1090
1091static void application_attempt_init(application_attempt_t *attempt) {
1092 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