]> err.no Git - systemd/commitdiff
libudev: monitor - use SOCK_NONBLOCK
authorKay Sievers <kay.sievers@vrfy.org>
Mon, 23 May 2011 20:37:02 +0000 (22:37 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Mon, 23 May 2011 20:37:02 +0000 (22:37 +0200)
libudev/libudev-monitor.c

index ec7669883603dea78d44606c09b094f79383708a..85ab23bdd4aba8b5e2be1dae8f8f56908aebd3d1 100644 (file)
@@ -178,7 +178,7 @@ struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const c
                return NULL;
 
        if (fd < 0) {
-               udev_monitor->sock = socket(PF_NETLINK, SOCK_RAW|SOCK_CLOEXEC, NETLINK_KOBJECT_UEVENT);
+               udev_monitor->sock = socket(PF_NETLINK, SOCK_RAW|SOCK_CLOEXEC|SOCK_NONBLOCK, NETLINK_KOBJECT_UEVENT);
                if (udev_monitor->sock == -1) {
                        err(udev, "error getting socket: %m\n");
                        free(udev_monitor);