<div dir="ltr"><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Akshay Sumant</b> <span dir="ltr">&lt;<a href="mailto:sumantakshay@gmail.com">sumantakshay@gmail.com</a>&gt;</span><br>
Date: Mon, Sep 15, 2008 at 7:51 PM<br>Subject: getting PID on DBus<br>To: <a href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a><br><br><br><div dir="ltr"><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>
From: <b class="gmail_sendername">Akshay Sumant</b> <span dir="ltr">&lt;<a href="mailto:sumantakshay@gmail.com" target="_blank">sumantakshay@gmail.com</a>&gt;</span><br>
Date: Mon, Sep 15, 2008 at 6:47 PM<br>Subject: Regarding DBus<br>To: <a href="mailto:walters@verbum.org" target="_blank">walters@verbum.org</a><br><br><br><div dir="ltr">Hi,<br>&nbsp;&nbsp;&nbsp; I have daemon exposing&nbsp; 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.&nbsp; It is not returning me valid PID. Please help. <br>


<br>Here is a code snippet,<br><br><i>DBusConnection *bus;<br>&nbsp; bus = dbus_g_connection_get_connection(context-&gt;connection);<br>&nbsp; status = dbus_connection_get_unix_process_id(bus,pid); </i><br><br>I am getting return value, status = FALSE.<br>


<br>&quot;context&quot; is a pointer of type DBusGMethodInvocation passed to method handler.<br>Signature of method handler,<br clear="all"><br><i>Disable_Timeout_handler(ClpDaemon *daemon, DBusGMethodInvocation *context)</i><br>


<br>Waiting for reply.<br>-- <br>Thank you.<br>Akshay Sumant.<br><br>
</div>
</div><br><br clear="all"><br>-- <br>Thank you.<br>Akshay Sumant.<br>&quot;Harder I work, more luck I seem to have&quot;<br>
</div>
</div><br><br clear="all"><br>-- <br>Thank you.<br>Akshay Sumant.<br>&quot;Harder I work, more luck I seem to have&quot;<br>
</div>