Fix WSL file locking by using flock instead of fcntl
Summary:
Co-authored-by: sipa <pieter@wuille.net>
Backport of Core PR18700
Test Plan:
On WSL
ninja check ninja check-functional
Confirm all tests pass except feature_proxy.py (fails), rpc_bind.py (skipped), and interface_zmq.py (skipped).
Using two different consoles:
src/bitcoind
Verify this fails on the second console with the following error:
Error: Cannot obtain a lock on data directory <path>/.bitcoin. Bitcoin ABC is probably already running.
Reviewers: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox
Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D6299