Fwd: getting PID on DBus

Akshay Sumant sumantakshay at gmail.com
Mon Sep 15 07:25:12 PDT 2008


---------- Forwarded message ----------
From: Akshay Sumant <sumantakshay at gmail.com>
Date: Mon, Sep 15, 2008 at 7:51 PM
Subject: getting PID on DBus
To: dbus at lists.freedesktop.org




---------- Forwarded message ----------
From: Akshay Sumant <sumantakshay at gmail.com>
Date: Mon, Sep 15, 2008 at 6:47 PM
Subject: Regarding DBus
To: walters at verbum.org


Hi,
    I have daemon exposing  a method on DBus which other processes are
using, I want to know PID of process calling exposed method, I have used
dbus_connection_get_unix_process_id.  It is not returning me valid PID.
Please help.

Here is a code snippet,

*DBusConnection *bus;
  bus = dbus_g_connection_get_connection(context->connection);
  status = dbus_connection_get_unix_process_id(bus,pid); *

I am getting return value, status = FALSE.

"context" is a pointer of type DBusGMethodInvocation passed to method
handler.
Signature of method handler,

*Disable_Timeout_handler(ClpDaemon *daemon, DBusGMethodInvocation *context)*

Waiting for reply.
-- 
Thank you.
Akshay Sumant.




-- 
Thank you.
Akshay Sumant.
"Harder I work, more luck I seem to have"



-- 
Thank you.
Akshay Sumant.
"Harder I work, more luck I seem to have"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20080915/bbb97a1a/attachment.html 


More information about the dbus mailing list