<HTML><HEAD>
<META http-equiv=Content-Type content='text/html; charset=utf-8'>
<title>Samsung Enterprise Portal mySingle</title>
<style> P, td, li {font-family:Arial, arial; font-size:9pt; margin-top:5px;margin-bottom:5px;} body{font-family:Arial, arial; font-size:9pt;}</style>
</HEAD><BODY>Dear Makuchaku,
<p>&nbsp;</p>
<p>Well.. using dbus_g_connection_unref and similar approach was the *struggle* 
I've talked about &lt;sigh&gt;</p>
<p>&nbsp;</p>
<p>dbus_g_bus_get</p>
<p>if (fork() == 0) </p>
<p>{</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;dbus_g_connection_unref // &nbsp;this closes the 
parent's dbus-connection !!</p>
<p>}</p>
<p>&nbsp;</p>
<p>Any development to resolve would introduce non-portable APIs specific to 
UNIX environment which I am reluctant to pursue.</p>
<p>&nbsp;</p>
<p>Best regards,</p>
<p>&nbsp;</p>
<p>Sean</p>
<p>&nbsp;</p><p>&nbsp;</p><br><br>------- <b>Original Message</b> -------<br><b>Sender</b> : मयंक जैन (makuchaku)&lt;mayank.gnu@gmail.com&gt;<br><b>Date</b>   : 2007-04-05 15:14<br><b>Title</b>  : Re: dbus fork problem<br><br>On&nbsp;4/5/07,&nbsp;Sean&nbsp;Kang&nbsp;&lt;sean_kang@samsung.com&gt;&nbsp;wrote:
<br>&gt;&nbsp;After&nbsp;strugging&nbsp;for&nbsp;a&nbsp;while,&nbsp;we&#39;ve&nbsp;noticed&nbsp;that&nbsp;dbus&nbsp;connection&nbsp;doesn&#39;t&nbsp;seem
<br>&gt;&nbsp;to&nbsp;work&nbsp;with&nbsp;fork()&nbsp;system&nbsp;call.
<br>&gt;
<br>&gt;&nbsp;The&nbsp;connection&nbsp;is&nbsp;copied&nbsp;but&nbsp;there&nbsp;is&nbsp;no&nbsp;API&nbsp;to&nbsp;properly&nbsp;close&nbsp;the
<br>&gt;&nbsp;connection&nbsp;so&nbsp;the&nbsp;new&nbsp;connection&nbsp;can&nbsp;be&nbsp;made.
<br>
<br>Hi&nbsp;Sean,
<br>
<br>Though&nbsp;I&#39;ve&nbsp;not&nbsp;used&nbsp;dbus-glib&nbsp;bindings&nbsp;with&nbsp;a&nbsp;system&nbsp;in&nbsp;which&nbsp;I&nbsp;had
<br>to&nbsp;fork,&nbsp;but&nbsp;maybe&nbsp;you&nbsp;can&nbsp;try&nbsp;dbus_g_connection_unref&nbsp;so&nbsp;that&nbsp;the
<br>refcount&nbsp;goes&nbsp;to&nbsp;zero&nbsp;&amp;&nbsp;the&nbsp;object&nbsp;is&nbsp;finalized.
<br>
<br>I&nbsp;hope&nbsp;it&nbsp;helps&nbsp;:)
<br>Makuchaku
<br>http://www.makuchaku.info/blog
<br>
<br>
<br></BODY></HTML>