Re: App control of linc/link part of ORBit2



Hi Jan,

On Tue, 2003-11-04 at 09:43, Jan Kratochvil wrote:
> I was successfuly using ORBit2 up to 2.6.0 to provide safe and clear RPC/API
> communication with part of code running in chroot(2)ed environment. Proper
> linc_set_tmpdir() and hardlinking of the UNIX domain sockets between the public
> and chroot(2)ed software part.

	Wow - that sounds most interesting :-) what application was this for
specifically ? I'm sorry this change caused you grief, it was really
necessary to make the threaded I/O work - we're still re-hashing the
linc2 API internally to make this work well; so ...

	the tmpdir is now set by src/orb/GIOP/giop.c's (giop_tmpdir_init),
which uses g_get_tmpdir to locate it's directory. You can configure that
by a putenv("TMPDIR=/foo/baa"); or some nicer env. setting mechanism.
Alternatively - if you want a directly equivalent fix you could hook the
(internal, private etc.) link_set_tmpdir method.

> Also public linc_main_get_loop() allowed safe CORBA_ORB_run() break-out by
> asynchronous non-CORBA events occuring during CORBA_ORB_run() events handling.

	Hmm; this requirement is not really clear to me. The problem with the
mainloop is that we have to have to deal with these (several)
situations:

	* normal gtk/glib 'default' mainloop operation
	* custom CORBA_ORB_run mainloop
	* 'default' + separate I/O thread mainloop operation.

	The addition of the last state made it rather difficult to keep the
linc_main_get_loop functionality supportable.

	However - the good news is, that you should just be able to use the
default glib mainloop wherever you were using the linc loop before; just
replace all calls to CORBA_ORB_run with something like:

	ctxt = g_main_context_default ();
	loop = g_main_loop_new (ctxt, TRUE);
	g_main_loop_run (loop);

	Or somesuch; and just use the g_main_context_default where you were
using the linc context.

>  * Handling of chroot(2)ed environment:
>    Should I therefore start using IPv4 instead of UNIX domain sockets?

	nope; just use TMPDIR.

>  * Handling of GLib events:

	As above - ( which will also be backwards compatible incidentally ). If
there is a very good reason for not sharing with the main glib event
loop - you should prolly be using a threading policy to handle incoming
requests.

	Hope this helps, sorry for the breakage,

	Regards,

		Michael.

-- 
 michael@ximian.com  <><, Pseudo Engineer, itinerant idiot




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]