From: Guus Sliepen Date: Sat, 9 Nov 2019 16:52:19 +0000 (+0100) Subject: Use a separate lockfile to lock the configuration directory. X-Git-Url: http://git.meshlink.io/?a=commitdiff_plain;h=6c897377f68fc23ca9a8b23a6ca204517998b2e9;hp=6c897377f68fc23ca9a8b23a6ca204517998b2e9;p=meshlink Use a separate lockfile to lock the configuration directory. 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(). ---