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

Function bootstrap_fake_spawn

tests/test_daemon_bootstrap.c:240–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238}
239
240static bool bootstrap_fake_spawn(void *opaque, const cbm_daemon_bootstrap_launch_spec_t *spec) {
241 bootstrap_fake_ops_t *fake = opaque;
242 /* Client bootstrap must only ever spawn the EPHEMERAL two-argument
243 * shape; the permanent shape belongs exclusively to `daemon start`. */
244 bool exact = spec && spec->argc == 2U && spec->argv[0] && spec->argv[1] && !spec->argv[2] &&
245 strcmp(spec->argv[1], CBM_DAEMON_INTERNAL_ARG) == 0 && spec->detached &&
246 !spec->inherit_standard_handles && !spec->use_shell &&
247 atomic_load(&fake->handoff_count) > 0 && atomic_load(&fake->lock_held) == 1;
248 if (!exact) {
249 return false;
250 }
251 atomic_fetch_add(&fake->spawn_count, 1);
252 atomic_store(&fake->available, true);
253 return true;
254}
255
256static void bootstrap_fake_diagnostic(void *opaque, const char *message) {
257 bootstrap_fake_ops_t *fake = opaque;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected