removeLivenessFiles(state: DaemonState): Promise<void>
Unlinks the daemon's on-disk liveness markers: the socket, the info file, and the lock.
socket/info are gated on listenSucceeded — a daemon that reaches shutdown without ever binding
(e.g. an early throw) doesn't own them, and unlinking would corrupt whatever started in its
place. The lock IS ours unconditionally: reaching shutdown means tryAcquireDaemonLock returned
true, so always release it or the next spawn has to stale-pid-recover.
import type * as Server from './server.ts'; type State = Parameters<typeof Server.removeLivenessFiles>[0]; // Defined, not invoked: unlinks socket + info (when owned) and always the lock. async function releaseMarkers(remove: typeof Server.removeLivenessFiles, state: State) { await remove(state); // before the slow browser teardown, so clients see "gone" fast }
state: DaemonState