mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
libudev: monitor - use SOCK_NONBLOCK
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user