Expand description
Daemon auto-spawn.
vs and the daemon are the same binary. When the CLI runs and the
daemon socket is missing, spawn_daemon re-execs vs serve
detached from the current process. The CLI then waits for the
socket to appear (with a timeout). Failure to spawn or connect
within the budget yields a local error (the user sees
! DAEMON_START_FAILED-equivalent stderr).
Functions§
- daemon_
binary - Path to the
vsbinary that should run the daemon. Resolution order: - spawn_
daemon - Spawn
vs servedetached. Inherits no stdio so the CLI process is not kept alive by the daemon’s pipes. - wait_
for_ socket - Wait until a daemon is reachable at
socket, polling at ~50ms. On Unix this checks for the AF_UNIX socket file; on Windows it connect-probes the named pipe (pipes don’t appear on the filesystem). ReturnsOk(())on success, error on timeout.