[Architecture] Local\\ vs Global\\ Mutex namespace for single-instance
Rewrite, fix, or translate text in any Windows app via a hotkey
Brought to you by:
phantasmat2018
Originally created by: phantasmat2018
Status: Architecture decision, archived for reference.
CapyBro uses a Local\CapyBroV2 named mutex for single-instance enforcement (each Windows session gets its own slot, so two users on the same machine can both run CapyBro independently).
This was a deliberate change from the Global\ namespace, which:
SeCreateGlobalPrivilege (held only by Administrators + INTERACTIVE)Local\ namespace means:
EventWaitHandle is also session-scoped (can't activate across sessions)If anyone ever proposes "let's switch back to Global\" - please re-read the kiosk-compatibility constraint first. We've been here.
src/CapyBro/Platform/SingleInstance.cs - implementationLocal\CapyBroV2.Activate - paired EventWaitHandle for cross-instance signalingIf we add an admin-install variant (alongside the per-user install), we COULD use Global\ for that variant. But maintaining two binary configurations is overhead - punt until there's real demand.