Page
On Windows, rm on a just-closed .tern/lock can return before the file is gone. For a few milliseconds it is pending delete, and open(path, 'wx') on it fails with EPERM or EBUSY.
Consequence: reopening the journal right after closing it was flaky on windows-latest (ci-matrix) and never failed on macOS.
Fix: acquireLock() retries exactly those two codes with a short backoff (5 attempts, 20 ms doubling) and rethrows anything else. See lock-file.