Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Way to find pid of a QWSClient app from QWSServer in Qt/Embedded?
Forum Updated to NodeBB v4.3 + New Features

Way to find pid of a QWSClient app from QWSServer in Qt/Embedded?

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 1 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    anomaly256
    wrote on last edited by
    #1

    Anyone know if there's an easy way to determine a QWSClient's containing process in Qt/Embedded from the QWSServer process?

    I can find the QWSClient from QWSServer::instance()->clientWindows() but need to marry it up to a process (well, a commandline actually, but if I know the pid I can find this through the usual procfs methods).

    Also, I don't have access to the sources for the given QWSClient apps so I can't make them report their QApplication process's pid or commandline to the server directly..

    1 Reply Last reply
    0
    • A Offline
      A Offline
      anomaly256
      wrote on last edited by
      #2

      Well, after looking through the qt 4.8.0 sources and playing with intercepting QWSServer's unix domain socket for client events, I see that QWSClients' QApplication threads announce the QWSClient identity when opening the socket.

      It looks like the (only?) way to do what I need is to extend QWSServer and use the socket connection descriptors to find the connecting process and map it with the reported identity and pass it up to the (also extended, to ensure instancing of the extended QWSServer derrived class instead of the original) host QApplication::GuiServer

      I'm still hoping someone can point me towards a cleaner, more direct method of achieving this, preferably some internal pre-existing mechanism I've just overlooked.. :)

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved