Skip to content

Windows SHM: Processes running in different Session IDs cannot communiate (eg when running from a windows service) #2272

@YangHuaidong

Description

@YangHuaidong

Problem Description

When I make my service into a Windows service, I expect that the main service with system privileges will start a process to publish a topic, and then I use a normal privileged process to subscribe to it and get messages. However, I find that publishing the topic and sending messages are all fine, but after subscribing, I can't get messages. Why is this? I hope to seek help

How to reproduce

As described above

How did you get eCAL?

Download from Release Page

Environment

eCAl: 5.12.4 windwos 10

Summary by eCAL Devs:

  • The SHM Layer fails when Processes run with different Session IDs
  • This Stackoverflow page tells how to open "global" objects: https://stackoverflow.com/questions/47021915/c-issues-using-named-shared-memory
  • I think it should be possible to use psexec to run with any program uner a different session ID (the -i parameter)
    psexec.exe -accepteula -nobanner -i 1 -s C:\eCAL\bin\ecal_sys_client.exe --auto-accept-security-risk
    Session ID 1 is usually the ID of the session you are looking at when you sit in front of the PC
  • The session ID of a windows task can be obtained from the Taskmanager or Process hacker by enabling the corresponding column ("Sitzungskennung" in German Windows)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions