Exemplo n.º 1
0
int bot_gtk_quit_on_interrupt()
{
    if( 0 != signal_pipe_init() ) return -1;

    signal_pipe_add_signal( SIGINT );
    signal_pipe_add_signal( SIGTERM );
    signal_pipe_add_signal( SIGHUP );

    return signal_pipe_attach_glib( gqoi_handler, NULL );
}
Exemplo n.º 2
0
int 
signal_pipe_glib_quit_on_kill( GMainLoop *mainloop )
{
    if( 0 != signal_pipe_init() ) return -1;

    signal_pipe_add_signal( SIGINT );
    signal_pipe_add_signal( SIGTERM );
    signal_pipe_add_signal( SIGKILL );
    signal_pipe_add_signal( SIGHUP );

    return signal_pipe_attach_glib( spgqok_handler, mainloop );
}