HomePhabricator

Fix WSL file locking by using flock instead of fcntl

Description

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

Details

Provenance
Samuel Dobson <dobsonsa68@gmail.com>Authored on Apr 18 2020, 23:07
nakihitoCommitted on May 29 2020, 20:38
nakihitoPushed on May 29 2020, 20:39
Reviewer
Restricted Owners Package
Differential Revision
D6299: Fix WSL file locking by using flock instead of fcntl
Parents
rABCd5188dc324c4: Bump version to 0.21.9
Branches
Unknown
Tags
Unknown