[omniORB] difference between orb->destroy and orb->shutdown
Duncan Grisby
duncan@grisby.org
Wed Jan 22 10:33:01 2003
On Sunday 19 January, "Ferdinand Zaubzer" wrote:
> What is the difference between orb->destroy and orb->shutdown?
shutdown stops the ORB from receiving new requests, and making new
outgoing calls. destroy frees up all the resources used by the ORB.
The main reason for the separation is that you can call shutdown in a
way that doesn't wait for it to complete, meaning you can call
shutdown inside an operation invocation, without the risk of
deadlocking waiting for yourself to complete.
> I tried to use orb->destroy to be called when a term signal is recieved, but
> it didn't work. With orb->shutdown it works fine. - Why?
>
> Of course I didn't use orb->destroy or orb->shutdown in the signalhandler,
> but I unlocked a mutex in a signalhandler that lets start a thread in which
> orb->destroy or orb->shutdown was called.
I don't know why destroy isn't working in this situation. However, you
should not use a mutex in a signal handler. The only threading
primitive that is guaranteed signal safe is the System V semaphore.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan@grisby.org --
-- http://www.grisby.org --