[omniORB] orb->shutdown() in a signal handler

Favre Benoit ben.favre@wanadoo.fr
Tue Jul 16 13:45:02 2002


thanks, it works fine.
I have an other question. Is it safe to instanciate corba objects in corba 
object ?
I have written a dynamic implementation loader (life cycle object) and it 
loads implementations from .so libraries. I would like to release the library 
when it is not needed anymore but if i use CORBA::release on the object, it 
generates a core dump.

thank you, Benoit Favre

> > Is there a special issue for using orb->shutdown() in a signal handler ?
>
> Yes -- don't do it!
>
> All sorts of things can go wrong if you try it. None of the usual
> thread synchronisation things are guaranteed to work. Sometimes they
> will, sometimes they'll blow up.
>
> The correct solution is to have a thread waiting on a POSIX
> semaphore. sem_post() is the only threading primitive that is signal
> safe.
>
> Cheers,
>
> Duncan.