Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-67472

QLocalServer uses user-dependent socket path on macOS

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Out of scope
    • P3: Somewhat important
    • None
    • 5.10.1
    • Network
    • None
    • macOS 10.12

      Qt 5.10.1

       

    • macOS

    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.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            dremon Dmitry Pankratov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes