- FD_ZERO(&readfds);
- if (kernel_monitor != NULL)
- FD_SET(udev_monitor_get_fd(kernel_monitor), &readfds);
- if (udev_monitor != NULL)
- FD_SET(udev_monitor_get_fd(udev_monitor), &readfds);
-
- fdcount = select(MAX(udev_monitor_get_fd(kernel_monitor), udev_monitor_get_fd(udev_monitor))+1,
- &readfds, NULL, NULL, NULL);
+ fdcount = epoll_wait(fd_ep, ev, ARRAY_SIZE(ev), -1);