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

problems with QSharedMemory and QSystemSemaphore in Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 4.5.3, 5.4.2
    • Core: Threads
    • None

    Description

      Classes QSharedMemory and QSystemSemaphore currently do not create objects in the global namespace in Windows. That is, the names of the objects that these classes create do not start with "Global\".

      In later XP versions, in Windows Vista, and in Windows 7, shared memory and system semaphore objects that do not have a name starting with "Global\" cannot be accessed by other processes. As a result, on these platforms, if a Windows service creates a QSharedMemory or a QSystemSemaphore, other processes cannot access it, although this is a common IPC use case.

      As far as we can see, fixing this would require minor changes to functions QSharedMemoryPrivate::handle(), QSharedMemoryPrivate::create(int), and QSystemSemaphorePrivate::handle(QSystemSemaphore::AccessMode).

      Another limitation is related to security attributes of QSharedMemory and QSystemSemaphore instances:

      There should be an easy way to create these instances such that "Everybody" (i.e., well-known sid "S-1-1-0") is granted GENERIC_ALL-right.

      Attachments

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

        Activity

          People

            owolff Oliver Wolff
            atrux Antoine Trux
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            8 Vote for this issue
            Watchers:
            14 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes