Re: orbacus coredump

Stan Lewis <[email protected]> Mon, 20 Nov 2006 13:32:02 -0500
Newsgroups gmane.comp.corba.orbacus
Organization IONA Technologies
Message-ID <[email protected]>
Hi William,

On Friday 17 November 2006 11:20, =B3=FE =C1=F4=CF=E3 wrote:
> Hi!
>     In my program, I use DII through which c++ client calls c++ server.
>     And after running for a while, I stop the test through calling exit=
()
> in my program. Then my program occurs coredump, while in fact orbacus
> occurs coredump.
>     If I change exit with _exit, everything is ok. But I don't know why
> this happens. Thanks!

You need to make sure that you call orb->destroy() before calling exit().=
 =20
When you call exit(), the main function returns and the destruction of st=
atic=20
objects starts.  However, the ORB itself is not properly cleaned up and d=
oes=20
make use of some static objects itself, which can in fact lead to crashes=
 if=20
the ORB were to attempt to call a function on one of these static objects.

Using _exit() terminates the process without calling the destructors of a=
ny=20
static objects, which is why no core dump occurs.

However, in any case a CORBA complaint application *must* call ORB::destr=
oy()=20
before exiting to ensure all resources allocated by the ORB when it was=20
initialized can be cleaned up by the ORB.

Regards,

Stan
--=20
Stan Lewis                         =20
Team Orbacus - Your CORBA Source
E-Mail: [email protected]
WWW: http://www.orbacus.com
_______________________________________________
OB-Users Mailing List - [email protected]
http://mail.ooc.nf.ca/mailman/listinfo/ob-users
Visit our support FAQ before you send a message.
http://www.orbacus.com/faq/support.html