In case anyone has stumbled into the same problem, owen pointed out a simple solution in #clutter:
import signal signal.signal(signal.SIGINT, signal.SIG_DFL) Which fixes the problem :-) Best regards, Johannes H. Jensen On Wed, Jan 19, 2011 at 3:22 AM, Johannes H. Jensen <[email protected]> wrote: > Hi, > > I've noticed that PyClutter's main loop seems to ignore SIGINT signals > by default (i.e. Ctrl-C, KeyboardInterrupt). While an equivalent C > program exits when receiving SIGINT, this does not seem to be the case > with Python. > > Consider these two simple test programs[1][2], which both simply set > up a minimal stage and start the main loop. The first one is in C, and > exits as expected when hitting Ctrl-C. The second one is in Python and > does not exit when hitting Ctrl-C. > > Are some extra steps required for this to work in PyClutter programs, > or have I stumbled upon a bug? > > I'm running Clutter 1.2.12 and PyClutter 1.0.2 on Ubuntu 10.10. > > > Best regards, > > Johannes H. Jensen > > [1] > https://github.com/joh/pyclutter-screensaver/blob/pyclutter-sigint/test-clutter.c > [2] > https://github.com/joh/pyclutter-screensaver/blob/pyclutter-sigint/test-clutter.py > _______________________________________________ clutter-app-devel-list mailing list [email protected] http://lists.clutter-project.org/listinfo/clutter-app-devel-list
