summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--libudev/libudev-ctrl.c2
-rw-r--r--libudev/libudev-monitor.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index ccbaa46cd9..afec73c3e5 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ udevadm control --exit
udevadm info --cleanup-db
systemd netlink socket activation
+stop socket or mask on rpm update
requires systemd 25
udev 167
diff --git a/libudev/libudev-ctrl.c b/libudev/libudev-ctrl.c
index 7fa2d1d535..a2133fff1c 100644
--- a/libudev/libudev-ctrl.c
+++ b/libudev/libudev-ctrl.c
@@ -91,7 +91,7 @@ struct udev_ctrl *udev_ctrl_new_from_socket_fd(struct udev *udev, const char *so
return NULL;
if (fd < 0) {
- uctrl->sock = socket(AF_LOCAL, SOCK_SEQPACKET|SOCK_CLOEXEC, 0);
+ uctrl->sock = socket(AF_LOCAL, SOCK_SEQPACKET|SOCK_NONBLOCK|SOCK_CLOEXEC, 0);
if (uctrl->sock < 0) {
err(udev, "error getting socket: %m\n");
udev_ctrl_unref(uctrl);
diff --git a/libudev/libudev-monitor.c b/libudev/libudev-monitor.c
index 5d9e155722..d890b4b142 100644
--- a/libudev/libudev-monitor.c
+++ b/libudev/libudev-monitor.c
@@ -145,7 +145,7 @@ struct udev_monitor *udev_monitor_new_from_socket(struct udev *udev, const char
util_strscpy(&udev_monitor->sun.sun_path[1], sizeof(udev_monitor->sun.sun_path)-1, socket_path);
udev_monitor->addrlen = offsetof(struct sockaddr_un, sun_path) + strlen(socket_path)+1;
}
- udev_monitor->sock = socket(AF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0);
+ udev_monitor->sock = socket(AF_LOCAL, SOCK_DGRAM|SOCK_NONBLOCK|SOCK_CLOEXEC, 0);
if (udev_monitor->sock == -1) {
err(udev, "error getting socket: %m\n");
free(udev_monitor);