[omniORB] server/orb shutdown question
Duncan Grisby
duncan at grisby.org
Fri Jul 25 17:11:49 BST 2003
On Friday 18 July, "Lee, Robert C." wrote:
[...]
> So what I did was to trap a SIGTERM signal which causes the server (which
> creates/incarnates the Corba object on startup) to unregister the object
> reference with "A". Then I want to exit. What the signal handler does is to
> unregister, call orb->destory, and then exit. However, the exit call is
> never reached. The call to orb->destory() never returns.
The problem is that most things you might want to do are not safe to
do inside signal handlers. The only thing that is guaranteed safe to
do in a signal handler is to signal on a system V semaphore. You
should use that to wake up a thread. Use the thread to do the
shutdown, and all should be fine.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list