[omniORB] How can I get control after all orb->run()

Ivanov, Roumen Roumen.Ivanov@drkw.com
Wed, 1 Aug 2001 17:44:35 +0200


You are saying "...every time the orb->run() is called, the program lost its
control..."
The control simply stays somewhere in omnORB's libraries waiting for the
orb's shutdown.
There is nothing wrong with this to stop the program using ctrl-c or kill
with default signal (SIGINT). 
As I understand you would like to continue doing some more things in this
thread instead waiting for orb->run().
If this is correct just don't call orb->run and go on.

In case I got you wrong please be more specific.


-----Original Message-----
From:	zhangzq71 [SMTP:zhangzq71@21cn.com]
Sent:	Wednesday, August 01, 2001 15:06
To:	Ivanov, Roumen
Cc:	omniorb-list@uk.research.att.com
Subject:	Re: [omniORB] How can I get control after all orb->run()

sorry, I don't understand, if don't call orb->run(), what should I do? can
you give me some samples?

----- Original Message ----- 
From: "Ivanov, Roumen" <Roumen.Ivanov@drkw.com>
To: "'zhangzq71'" <zhangzq71@21cn.com>
Cc: <omniorb-list@uk.research.att.com>
Sent: Wednesday, August 01, 2001 7:28 PM
Subject: RE: [omniORB] How can I get control after all orb->run()


> You don't need to call orb->run(). It is enough to activate (better
> explicitly) your servants. In my case, after doing this, I'm waiting on a
> semaphore, which will be posted in case my signal handler gets a signal
for
> shutting down. You could do something else. About the crash, there are two
> things I could suggest:
> 1. Make sure that you are creating the orb and poa on the heap in xxx_ptr
> wrappers.
> 2. You should not call the shutdown from your signal handler and better
not
> from within an interface method implementation
> Roumen
> -----Original Message-----
> From: zhangzq71 [SMTP:zhangzq71@21cn.com]
> Sent: Wednesday, August 01, 2001 01:37
> To: Len Holgate (Mail List Account)
> Cc: omniorb-list@uk.research.att.com
> Subject: Re: [omniORB] How can I get control after all orb->run()
> 
> I have tried the orb->shutdown() before, orb->run running in a thread,
call
> orb->shutdown in another, but after this called, the program crash. can
you
> give me some examples? Thank you very much.
> 
> zhangzq71
> 
> 
> ----- Original Message ----- 
> From: "Len Holgate (Mail List Account)" <Mail-lists@dial.pipex.com>
> To: "zhangzq71" <zhangzq71@21cn.com>; <omniorb-list@uk.research.att.com>
> Sent: Wednesday, August 01, 2001 5:11 AM
> Subject: Re: [omniORB] How can I get control after all orb->run()
> 
> 
> > We have an interface that has a shutdown method. The shutdown method
> unbinds
> > any names we've bound in the server, does any other cleanup tasks that
> > require the orb to still be functional and then calls
> orb->shutdown(false).
> > Active method calls complete and the run() method eventually returns in
> the
> > main thread and the server exits gracefully. Works a treat.
> > 
> > Len
> > http://www.jetbyte.com
> > 
> > ----- Original Message -----
> > From: "zhangzq71" <zhangzq71@21cn.com>
> > To: <omniorb-list@uk.research.att.com>
> > Sent: Tuesday, July 31, 2001 2:58 PM
> > Subject: [omniORB] How can I get control after all orb->run()
> > 
> > 
> > > every time the orb->run() is called, the program lost its control, how
> can
> > I stop the program rather than hit Ctrl+break?
> > >
> > > zhangzq71
> > >
> > >
> > 
> > 
> > 
>