Expand description
The barkd single-instance guarantee: barkd.lock, exclusively locked
for the process lifetime. The wallet’s LOCK can’t serve here, since
it is only taken once a wallet is open.
Constants§
- BARKD_
LOCK_ FILE - File in the datadir exclusively locked for the lifetime of a barkd process.
Functions§
- acquire_
barkd_ lock - Take the exclusive barkd lock on the datadir, or fail fast when another barkd already runs there. The OS releases the lock when the returned value is dropped or the process exits, even on SIGKILL or a crash.
- wipe_
datadir_ except_ barkd_ files - Remove everything in the datadir except the running barkd’s own files, so the held lock and auth token survive a wallet wipe.