Skip to content

tryAcquireLock

function tryAcquireLock(lockPath): FileLockHandle | null;

Defined in: src/launcher/lock.ts:132

Try to acquire the lock once, non-blocking.

Returns a release callback on success, or null when the lock is held by another live process. Stale stamps (PID not alive) are cleared and the call retries.

ParameterType
lockPathstring

FileLockHandle | null