discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Shutting down a usrp_sink_s


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] Shutting down a usrp_sink_s
Date: Mon, 16 Mar 2009 17:42:28 -0700
User-agent: Mutt/1.5.18 (2008-05-17)

On Mon, Mar 16, 2009 at 09:09:57AM -0700, Johnathan Corgan wrote:
> On Mon, Mar 16, 2009 at 7:43 AM, Mattias Kjellsson <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]