beads/internal/lockfile/lock.go
darcy bec10c8632 chore: remove daemon infrastructure (lockfile, activity signal) (bd-9u8zd)
Delete signalOrchestratorActivity and main_daemon.go, remove daemon.lock
cleanup from doctor, remove TryDaemonLock and its tests, rename
errDaemonLocked to errProcessLocked, delete process_unix/wasm/windows.go.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 19:05:31 -08:00

17 lines
510 B
Go

package lockfile
import (
"errors"
)
// ErrLocked is returned when a lock cannot be acquired because it is held by another process.
var ErrLocked = errProcessLocked
// ErrLockBusy is returned when a non-blocking lock cannot be acquired
// because another process holds a conflicting lock.
var ErrLockBusy = errors.New("lock busy: held by another process")
// IsLocked returns true if the error indicates a lock is held by another process.
func IsLocked(err error) bool {
return err == errProcessLocked
}