mirror of
https://github.com/xcat2/confluent.git
synced 2025-01-17 21:23:18 +00:00
9975d57d5e
Under windows, we can't use flock. However we can get locking using msvcrt using different, but related semantics. Imitate whole file locking by just locking first byte. We have to make sure we seek() to the same place when locking and unlocking, as Windows requires the offset to be same for both operations.