Get the client PID in a server request

Luca Ferrari luka4e at gmail.com
Mon Oct 20 06:05:01 PDT 2008


Hello guys!

I searched for a while but I didn't find any solutions to this problem:

I've got a server (called SERVER) that exposed via DBUS a method
(called METHOD) and a client (called CLIENT) that would like to invoke
SERVER's METHOD method.

SERVER must first check the pid of CLIENT and then invoke METHOD if
the CLIENT's pid is in a list of known pids...


For example SERVER is running on pid 9000 and CLIENT is running on pid 101010:

SERVER is running on a mainloop

CLIENT connect to SERVER and invoke SERVER.METHOD

SERVER understand the client request and check the pid of the client
that has invoked the request.

SERVER now has client_pid=101010  and it start the verification...

How can I get the CLIENT PID in SERVER's METHOD???

ps. I'm using dbus-python....

Thank you
Regards

Luca


More information about the dbus mailing list