… | |
… | |
838 | { |
838 | { |
839 | int dummy; |
839 | int dummy; |
840 | read (evpipe [0], &dummy, 1); |
840 | read (evpipe [0], &dummy, 1); |
841 | } |
841 | } |
842 | |
842 | |
843 | if (gotsig) |
843 | if (gotsig && ev_is_default_loop (EV_A)) |
844 | { |
844 | { |
845 | int signum; |
845 | int signum; |
846 | gotsig = 0; |
846 | gotsig = 0; |
847 | |
847 | |
848 | for (signum = signalmax; signum--; ) |
848 | for (signum = signalmax; signum--; ) |
… | |
… | |
1218 | #endif |
1218 | #endif |
1219 | |
1219 | |
1220 | if (ev_is_active (&pipeev)) |
1220 | if (ev_is_active (&pipeev)) |
1221 | { |
1221 | { |
1222 | /* this "locks" the handlers against writing to the pipe */ |
1222 | /* this "locks" the handlers against writing to the pipe */ |
|
|
1223 | /* while we modify the fd vars */ |
|
|
1224 | gotsig = 1; |
|
|
1225 | #if EV_ASYNC_ENABLE |
1223 | gotsig = gotasync = 1; |
1226 | gotasync = 1; |
|
|
1227 | #endif |
1224 | |
1228 | |
1225 | ev_ref (EV_A); |
1229 | ev_ref (EV_A); |
1226 | ev_io_stop (EV_A_ &pipeev); |
1230 | ev_io_stop (EV_A_ &pipeev); |
1227 | close (evpipe [0]); |
1231 | close (evpipe [0]); |
1228 | close (evpipe [1]); |
1232 | close (evpipe [1]); |