testing/cross_backend/spawn_backend.ts view source
BackendHandle import type {BackendHandle} from '@fuzdev/fuz_app/testing/cross_backend/spawn_backend.js'; Handle returned by spawn_backend — passed to per-test setup helpers.
config
The config used to spawn this backend. Carried for diagnostic + downstream access.
type BackendConfig
child
Child process reference — exposed for diagnostic logging only.
type ChildProcess
daemon_token
Deterministic daemon token captured from
config.bootstrap.daemon_token_path after the binary booted.
default_cross_process_setup builds keeper-daemon-token headers
from this for _testing_reset calls.
type string
teardown
SIGTERM the child's process group — even when the child itself has
exited, so no descendant outlives it — and await the group's exit,
escalating to SIGKILL after a grace window. Idempotent — later calls
await the same exit. A descendant that left the group — spawned detached,
or one that called setsid — is out of reach and survives teardown.
type (): Promise<void>
Promise<void>