Files
hyperframes/packages
Vance Ingalls daea8d4281 fix(cli): close TOCTOU double-spawn race in VST sidecar singleton
startVstSidecar()'s singleton guard only checked the module-level
`running` variable, which is assigned inside the async ready-handshake
callback. A second concurrent call landing before the first child
became ready saw `running === null` and spawned its own child,
orphaning whichever process lost the ready race — exactly what
stopVstSidecar() and preview.ts's shutdown paths exist to prevent.

Track an in-flight `pending` promise, set synchronously before any
spawn/callback work, so concurrent callers share the same startup
attempt instead of double-spawning. Cleared via .finally() so a future
call after this attempt settles (success or failure) can retry.
2026-07-16 18:51:11 -07:00
..
2026-07-16 05:26:57 +00:00
2026-07-16 05:26:57 +00:00
2026-07-16 05:26:57 +00:00