On 7 Jan 2013, at 10:13, Ian Davidson wrote: > So, this is a C question - how do I trap the Ctrl-C? In C: http://www.gnu.org/software/libc/manual/html_node/Signal-Handling.html But your program uses the GLib / GObject framework -- I don't know whether that has special signal-handling mechanisms. Try googling for information on "GLib signal handling".