138.filesystem lock by crwood · Pull Request #141 · gridsync/gridsync
Conversation
A fix/workaround for the issue described in #138: rather than listening on port 52045 to provide a quick-and-dirty interprocess mutex that works across platforms, this PR instead leverages the python standard library's fcntl.flock() to provide a filesystem-based exclusive locking mechanism on UNIX-like systems (falling back to keeping an open file descriptor on Windows to provide similar -- but not wholly equivalent -- functionality), thereby preventing the situation in which Gridsync would sometimes erroneously throw a user-facing "Gridsync is already running" error message on certain macOS Mojave configurations (caused, it seems, from security/sandbox policies that might prevent listening/binding on ports).
crwood
deleted the
138.filesystem-lock
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters