mirror of
https://github.com/systemd/systemd.git
synced 2025-03-28 02:50:16 +03:00
libudev: monitor - use SOCK_NONBLOCK
This commit is contained in:
parent
bda2674f22
commit
13d83b88b6
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user