Re: SIGINT with gtk_main

2007-03-22 Thread Chris Vine
On Wednesday 21 March 2007 17:50, Michiel Jan Laurens de Hoon wrote: For my application, I need to run gtk_main but I want to quit gtk_main when either input is available on stdin or the user presses Ctrl-C. The former is easy (using g_io_add_watch), but I am not sure what the best approach is

SIGINT with gtk_main

2007-03-21 Thread Michiel Jan Laurens de Hoon
For my application, I need to run gtk_main but I want to quit gtk_main when either input is available on stdin or the user presses Ctrl-C. The former is easy (using g_io_add_watch), but I am not sure what the best approach is to handle Ctrl-C. Right now I am using g_timeout_add to check every

Re: SIGINT with gtk_main

2007-03-21 Thread zz
On Wednesday 21 March 2007 18:50:38 Michiel Jan Laurens de Hoon wrote: For my application, I need to run gtk_main but I want to quit gtk_main when either input is available on stdin or the user presses Ctrl-C. The former is easy (using g_io_add_watch), but I am not sure what the best

Re: SIGINT with gtk_main

2007-03-21 Thread Michiel Jan Laurens de Hoon
[EMAIL PROTECTED] wrote: static void signal_handler(int sig) { switch (sig) { case SIGINT: puts(SIGINT signal catched); break; case SIGTERM: puts(SIGTERM signal catched);