Jason Tackaberry wrote:
> On Sun, 2008-03-02 at 09:00 -0500, Jason Tackaberry wrote:
>> SIGINT isn't something kaa should be doing. If you want to restore the
>> SIGINT handler after you import directfb (and directfb actually is
>> replacing that handler), you can do:
>>
>> import signal
>> signal.signal(signal.SIGINT, signal.default_int_handler)
>
> I should add that if you do this, you will need to see what sort of
> cleanup dfb's SIGINT handler is doing, and make sure that happens if you
> decide to exit. You could fetch the existing handler and then call it
> later.
>
> import signal
> dfb_handler = signal.gethandler(signal.SIGINT)
> signal.signal(signal.SIGINT, signal.default_int_handler)
> kaa.main()
> dfb_handler()
If I replace the two signal handler calls in src/main.py with:
old_handler_int = signal.signal(signal.SIGINT,
signal.default_int_handler)
old_handler_term = signal.signal(signal.SIGTERM,
signal.default_int_handler)
It makes no difference, freevo sometime does and sometimes doesn't shut
down. I assume that signal.default_int_handler is the kaa handler.
Once I saw this:
DJW:Starting kaa main run loop
Shutdown by keyboard interrupt
DJW:shutdown(menuw=None, argshutdown=None, argrestart=None, exit=False)
This seems to work until a key has been pressed and then it blocks.
We need the SIGTERM handler too as DirectFB calls this from the SIGINT
handler.
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel