| 238 | } |
| 239 | |
| 240 | static 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 | |
| 256 | static void bootstrap_fake_diagnostic(void *opaque, const char *message) { |
| 257 | bootstrap_fake_ops_t *fake = opaque; |
nothing calls this directly
no outgoing calls
no test coverage detected