On Wed, 10 Jan 2018 17:12:20 +0800
Jeff Guo <jia....@intel.com> wrote:

> +static int
> +dev_monitor_fd_new(void)
> +{
> +
> +     int uevent_fd;
> +
> +     uevent_fd = socket(PF_NETLINK, SOCK_RAW | SOCK_CLOEXEC |
> +                     SOCK_NONBLOCK,
> +                     NETLINK_KOBJECT_UEVENT);
> +     if (uevent_fd < 0) {

If you used a blocking socket, then epoll would not be necessary.
There is one netlink socket for whole system, and the thread is only
reading from one fd.

Reply via email to