… | |
… | |
867 | running when nothing else is active. |
867 | running when nothing else is active. |
868 | |
868 | |
869 | ev_signal exitsig; |
869 | ev_signal exitsig; |
870 | ev_signal_init (&exitsig, sig_cb, SIGINT); |
870 | ev_signal_init (&exitsig, sig_cb, SIGINT); |
871 | ev_signal_start (loop, &exitsig); |
871 | ev_signal_start (loop, &exitsig); |
872 | evf_unref (loop); |
872 | ev_unref (loop); |
873 | |
873 | |
874 | Example: For some weird reason, unregister the above signal handler again. |
874 | Example: For some weird reason, unregister the above signal handler again. |
875 | |
875 | |
876 | ev_ref (loop); |
876 | ev_ref (loop); |
877 | ev_signal_stop (loop, &exitsig); |
877 | ev_signal_stop (loop, &exitsig); |