- if (ev_is_active (&ev->io))
- {
- ev_io_stop (&ev->io);
- --x_actives;
- }
-
- ev_io_set (&ev->io, ev->ev_fd, ev->ev_events & (EV_READ | EV_WRITE));
- ev_io_start (&ev->io);
- ++x_actives;
+ ev_signal_set (&ev->iosig.sig, ev->ev_fd);
+ ev_signal_start (EV_A_ &ev->iosig.sig);
+ }
+ else if (ev->ev_events & (EV_READ | EV_WRITE))
+ {
+ ev_io_set (&ev->iosig.io, ev->ev_fd, ev->ev_events & (EV_READ | EV_WRITE));
+ ev_io_start (EV_A_ &ev->iosig.io);