… | |
… | |
811 | fd_intern (evpipe [1]); |
811 | fd_intern (evpipe [1]); |
812 | |
812 | |
813 | ev_io_set (&pipeev, evpipe [0], EV_READ); |
813 | ev_io_set (&pipeev, evpipe [0], EV_READ); |
814 | ev_io_start (EV_A_ &pipeev); |
814 | ev_io_start (EV_A_ &pipeev); |
815 | ev_unref (EV_A); /* watcher should not keep loop alive */ |
815 | ev_unref (EV_A); /* watcher should not keep loop alive */ |
|
|
816 | |
|
|
817 | /* in case we received the signal before we had the chance of installing a handler */ |
|
|
818 | ev_feed_event (EV_A_ &pipeev, 0); |
816 | } |
819 | } |
817 | } |
820 | } |
818 | |
821 | |
819 | void inline_size |
822 | void inline_size |
820 | evpipe_write (EV_P_ int sig, int async) |
823 | evpipe_write (EV_P_ int sig, int async) |
… | |
… | |
838 | { |
841 | { |
839 | int dummy; |
842 | int dummy; |
840 | read (evpipe [0], &dummy, 1); |
843 | read (evpipe [0], &dummy, 1); |
841 | } |
844 | } |
842 | |
845 | |
843 | if (gotsig) |
846 | if (gotsig && ev_is_default_loop (EV_A)) |
844 | { |
847 | { |
845 | int signum; |
848 | int signum; |
846 | gotsig = 0; |
849 | gotsig = 0; |
847 | |
850 | |
848 | for (signum = signalmax; signum--; ) |
851 | for (signum = signalmax; signum--; ) |