On linux, there are better ways to do the "check if process already running" and send messages.
One is abstract sockets via std::os::linux::net::SocketAddrExt, use SO_PEERCRED to check that connecting UID matches your own UID.
The other is zbus, dbus for rust which is best for desktop integration. If the request_name(...) fails because the name is taken, you know the app is running. https://crates.io/crates/zbus
On Windows you could also use named pipes
https://learn.microsoft.com/en-us/windows/win32/ipc/named-pipe-security-and-access-rights
On linux, there are better ways to do the "check if process already running" and send messages.
One is abstract sockets via
std::os::linux::net::SocketAddrExt, useSO_PEERCREDto check that connecting UID matches your own UID.The other is zbus, dbus for rust which is best for desktop integration. If the
request_name(...)fails because the name is taken, you know the app is running. https://crates.io/crates/zbusOn Windows you could also use named pipes
https://learn.microsoft.com/en-us/windows/win32/ipc/named-pipe-security-and-access-rights