On Mon, Mar 16, 2009 at 09:09:57AM -0700, Johnathan Corgan wrote:
> On Mon, Mar 16, 2009 at 7:43 AM, Mattias Kjellsson <m...@kth.se> wrote:
> 
> > If I install a signal handler which catches ctrl+c and sets a flag, and then
> > use (still the same configuration) uses something like:
> >
> > top_block->start();
> > while(!signaled)
> >   asm(" nop");
> > top_block->stop();
> >
> > The flow- graph is run as long as ctrl+c isn't pressed and the destructor of
> > top_block is run as well.
> 
> This is the right way.  Unless you call top_block.run(), you are
> responsible for your own SIGINT handler.

Setting up your own signal handler is required, though it would be
better if you used sigwait instead of burning up cycles in your busy loop.

Eric


_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to