On Sun, 2008-03-02 at 14:08 +0100, Duncan Webb wrote:
> > register a callback to kaa.main.siganls['shutdown'] or do this after
> > all exception handling. BTW, you will also never run into except
> > SystemExit.
>
> I've added some prints into notifier main and the signal handler never
> gets called, after pressing ctrl-c.
If you're talking about the kaa.main.signals['shutdown'] handler, it
won't get called for SystemExit or KeyboardInterrupt. Is this something
you need to be able to do, intercept these two signals?
> What happens is that the signal handler is installed at the very
> beginning of the program. This is before DirectFB is started and I guess
> that DirectFB installed it's own signal handlers and the last installed
> signal handler is used first so DirectFB exits before kaa has seen the
> ctrl-c.
Ok, here you must be talking about unix signals, SIGINT. Messing with
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)
Jason.
-------------------------------------------------------------------------
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