]> git.meshlink.io Git - meshlink/commitdiff
Use a separate lockfile to lock the configuration directory.
authorGuus Sliepen <guus@meshlink.io>
Sat, 9 Nov 2019 16:52:19 +0000 (17:52 +0100)
committerGuus Sliepen <guus@meshlink.io>
Sat, 9 Nov 2019 16:52:19 +0000 (17:52 +0100)
We can't use meshlink.conf as the lock file, since it can move around.
Instead, create meshlink.lock right below confbase, and keep it always
locked while a meshlink handle is valid.

meshlink_destroy() will also use this lockfile to ensure we don't destroy
a directory that is still in use, and prevent race conditions between
meshlink_destroy() and meshlink_open().


No differences found