maple.utils.lock.DaemonLock.acquire
- DaemonLock.acquire() bool
Attempt to acquire the daemon lock.
Tries to bind to the Unix socket path. If successful, the lock is held until release() is called or the process terminates.
Handles stale locks by testing connectivity - if a socket file exists but no daemon responds, it’s removed and lock acquisition is retried.
- Returns:
True if lock was successfully acquired, False if another daemon is already running or lock acquisition failed.