<div dir="ltr"><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Akshay Sumant</b> <span dir="ltr"><<a href="mailto:sumantakshay@gmail.com">sumantakshay@gmail.com</a>></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"><<a href="mailto:sumantakshay@gmail.com" target="_blank">sumantakshay@gmail.com</a>></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> 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. <br>
<br>Here is a code snippet,<br><br><i>DBusConnection *bus;<br> bus = dbus_g_connection_get_connection(context->connection);<br> status = dbus_connection_get_unix_process_id(bus,pid); </i><br><br>I am getting return value, status = FALSE.<br>
<br>"context" 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>"Harder I work, more luck I seem to have"<br>
</div>
</div><br><br clear="all"><br>-- <br>Thank you.<br>Akshay Sumant.<br>"Harder I work, more luck I seem to have"<br>
</div>