PurpleI2P / i2pd-qt

i2pd with Qt based GUI
BSD 3-Clause "New" or "Revised" License
59 stars 11 forks source link

Allow only a single instance of i2pd-qt per user #102

Open nonlin-lin-chaos-order-etc-etal opened 1 month ago

nonlin-lin-chaos-order-etc-etal commented 1 month ago

Create & keep $HOME/.var/i2pd_qt/i2pd_qt.pid and $HOME/.var/i2pd_qt/i2pd_qt.tcp-lock-socket and check it on startup, and fail additional processes when this user's pid exists and active: check tcp-lock-socket, and fail with a dialog notice if connection is not refused & is locked by another process by the same user. If another app is active, highlight or select its main window, bring to top of display GUI shell windows stack.

On non-Unix, do something utterly similar.