Dirk Meyer wrote:
> Duncan Webb wrote:
>> Using the last released kaa.base-0.3.0, the record server's Popen works 
>> correctly. All I had to change was to rename the coroutine decorators, 
>> Anyway the yield_execution calls don't work kaa-base-0.3.0 and Python 
>> 2.4, send errors.
>>
>> The shut down and ctrl-c don't work in rel-1 svn but does with 1.8.0rc2; 
>> I could have changed something but can't think of anything so I'll merge 
>> 1.8.0rc2 code into svn and see if it makes a difference. The 
>> recordserver does not exit with a freevo recordserver stop. I merge the 
>> code from 1.8.0rc2 for the recordserver first to see when it start 
>> shutting down again first may be I will find the offending change.
> 
> I can not reproduce it. C-c should send a system exit. Yes, we changed
> some stuff, also in this part of the code, but raising a SystemExit
> should always trigger kaa.main.stop.
> 

In notifier main.py I added this
if threading.enumerate()[0] == threading.currentThread():
     def signal_handler(*args):
         print 'DJW:signal_handler(args=%r)' % (args,)
         notifier.shutdown()
     print 'DJW:signal.signal(signal.SIGTERM, signal_handler)'
     signal.signal(signal.SIGTERM, signal_handler)
     print 'DJW:signal.signal(signal.SIGINT, signal_handler)'
     signal.signal(signal.SIGINT, signal_handler)
else:
     print 'DJW:kaa imported from thread, disable SIGTERM handler'
     log.info('kaa imported from thread, disable SIGTERM handler')

So I expect to see:
DJW:signal.signal(signal.SIGTERM, signal_handler)
DJW:signal.signal(signal.SIGINT, signal_handler)
[stuff from DirectFB and freevo]
ctrl-c
DJW:signal_handler(args='')

What I see is:
# freevo
DJW:signal.signal(signal.SIGTERM, signal_handler)
DJW:signal.signal(signal.SIGINT, signal_handler)
[snip]
      =======================|  DirectFB 1.1.1  |=======================
[snip]
DJW:removed main.signal.signal(signal.SIGTERM, signal_handler)
DJW:Starting kaa main run loop
ctrl-c
(!) [ 9345:  218.608] --> Caught signal 2, no siginfo available <--
(!) [ 9345:  218.609] --> Caught signal 15, no siginfo available <--

May be we need to to tell kaa to install the signal handler if it is not 
installed at the start of the main loop. Of course X has a different 
behaviour.

Duncan

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to