Details
-
Suggestion
-
Resolution: Out of scope
-
P3: Somewhat important
-
None
-
5.10.1
-
None
-
macOS 10.12
Qt 5.10.1
Description
When a short name is passed to QLocalServer::listen function it uses the TMPDIR environment variable (tested on macOS 10.12) to create the full path to the socket file, which is user-dependent and looks like this: /var/folders/xx/hash/T, which depends on the user to which the process belongs.
This differs from Linux (where sockets are created under /tmp directory) and Windows (where they are pipes) in a way that the same short name cannot be used in applications running under different user contexts, for example daemon backend and application frontend.
I think this breaks the general cross-platform design of the QLocalSocket/QLocalServer and requires #ifdef's to use absolute socket paths on macOS.