added a mechanism to call g_main_loop_quit() when the signal received.