mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 02:40:12 +08:00
The journal's cross-process lock read byte 0 of the lock file before taking msvcrt.LK_LOCK, to see whether the file still needed its one byte. Windows byte-range locks are mandatory, so while another process held that byte the read failed with PermissionError and the second writer crashed instead of waiting for the lock. Size the file with seek/tell, as the grants, cron and Codex-auth locks already do, then lock.