Re: [Discuss-gnuradio] KeyboardInterrupt not being caught in top_block

2010-06-18 Thread Eric Blossom
On Fri, Jun 18, 2010 at 06:14:55PM +1000, Kyle Zhou wrote: > > On 18/06/2010, at 2:56 AM, Eric Blossom wrote: > > > > Kyle, > > > > Are you trying to set a handler for a signal somewhere in your code? > > If so, it's unlikely to work. In general signals and threads don't > > play together well.

Re: [Discuss-gnuradio] KeyboardInterrupt not being caught in top_block

2010-06-18 Thread Kyle Zhou
On 18/06/2010, at 2:56 AM, Eric Blossom wrote: > > Kyle, > > Are you trying to set a handler for a signal somewhere in your code? > If so, it's unlikely to work. In general signals and threads don't > play together well. A bit of googling will show you the mine field. > > If you're trying to

Re: [Discuss-gnuradio] KeyboardInterrupt not being caught in top_block

2010-06-17 Thread Eric Blossom
On Thu, Jun 17, 2010 at 02:53:28PM +1000, Kyle Zhou wrote: > Thanks Eric, > I am using GNU Radio git depository installed a month ago. > tried on Cygwin 1.7.5+WinXP and OSX 10.6.3+Macbook, both behaved the same. > I'll try ubuntu tomorrow when I have access to another PC. > Ctrl+C exits the program

Re: [Discuss-gnuradio] KeyboardInterrupt not being caught in top_block

2010-06-16 Thread Kyle Zhou
Thanks Eric, I am using GNU Radio git depository installed a month ago. tried on Cygwin 1.7.5+WinXP and OSX 10.6.3+Macbook, both behaved the same. I'll try ubuntu tomorrow when I have access to another PC. Ctrl+C exits the program but not caught by except. On 17/06/2010, at 5:45 AM, Eric Blossom w

Re: [Discuss-gnuradio] KeyboardInterrupt not being caught in top_block

2010-06-16 Thread Eric Blossom
What version of GNU Radio? What OS, distribution, version? (We fixed bugs in this area about a year ago...) On Thu, Jun 17, 2010 at 12:29:10AM +1000, Kyle Zhou wrote: > > Basically, I want to catch Ctrl+C after top_block.run() > For example > > try: > > my_top_block().run() > >

Re: [Discuss-gnuradio] KeyboardInterrupt not being caught in top_block

2010-06-16 Thread Michael Berman
On Wed, Jun 16, 2010 at 7:29 AM, Kyle Zhou wrote: > Basically, I want to catch Ctrl+C after top_block.run() > For example > > try: > > my_top_block().run() > > except KeyboardInterrupt: > > print "Ctrl+C has been pressed. Exiting." > > > However, when Ctrl+C is pressed, th

[Discuss-gnuradio] KeyboardInterrupt not being caught in top_block

2010-06-16 Thread Kyle Zhou
Basically, I want to catch Ctrl+C after top_block.run() For example try: my_top_block().run() except KeyboardInterrupt: print "Ctrl+C has been pressed. Exiting." However, when Ctrl+C is pressed, the program exits straight away without executing the print function. It