Fix duplicate running manager instance checker on Linux#6893
Fix duplicate running manager instance checker on Linux#6893
Conversation
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
There was a problem hiding this comment.
Pull request overview
Updates duplicate-instance detection to avoid multiple BOINC Manager instances on Linux by configuring the wxSingleInstanceChecker to use a deterministic directory.
Changes:
- Add a
__WXGTK__code path that creates the instance-checker lock in the system temp directory. - Update copyright year.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #elif defined(__WXGTK__) | ||
| m_pInstanceChecker = new wxSingleInstanceChecker( | ||
| wxTheApp->GetAppName() + '-' + wxGetUserId(), | ||
| wxFileName::GetTempDir() | ||
| ); |
There was a problem hiding this comment.
Using a world-writable temp directory for the instance checker lock can allow another local user/process to pre-create or manipulate the lock file (e.g., denial-of-service, or symlink/path tricks depending on wxWidgets internals). Prefer a per-user, non-world-writable location on Linux (e.g., an XDG runtime/user-specific dir via wxStandardPaths, or a directory under the user’s home/config/data dir) while keeping the app+user-based lock name.
Summary by cubic
Fixes duplicate instance detection on Linux by creating the single-instance lock in the system temp directory when running under wxGTK. This prevents multiple BOINC Manager instances from starting for the same user.
Written for commit 10b1e8c. Summary will update on new commits.