def _glib_sigint_handler(cls, user_data):
        context = cls._loop_contexts[-1]
        context._quit_by_sigint = True
        context._loop_exit_func()

        # keep the handler around until we explicitly remove it
        return True