mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-20 08:57:44 +00:00
#3755's hand-off listens on a loopback port, and every `flatpak run` gets its own network namespace, so inside the sandbox the second launch could never reach the first and opened a separate window. When FLATPAK_ID and XDG_RUNTIME_DIR are set the primary now listens on $XDG_RUNTIME_DIR/app/<app id>/instance.sock (0600), a directory every sandbox of the app shares, and records "socket" instead of "port" in instance.json. The lock, token, client cap, deadlines and reply are unchanged; a crashed primary's socket file is unlinked under the lock, and shutdown removes the socket.