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

Function cbm_spawn_backoff

src/foundation/subprocess.c:923–927  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

921#endif
922
923static void cbm_spawn_backoff(int attempt) {
924 long ms = 10L << (attempt < 6 ? attempt : 6);
925 struct timespec delay = {ms / 1000L, (ms % 1000L) * 1000L * 1000L};
926 (void)cbm_nanosleep(&delay, NULL);
927}
928
929/* fork() fails with EAGAIN under the same pressure posix_spawn does, and the
930 * fallback path must not be less robust than the primary one. */

Callers 2

cbm_fork_with_retryFunction · 0.85

Calls 1

cbm_nanosleepFunction · 0.85

Tested by

no test coverage detected