summaryrefslogtreecommitdiff
path: root/src/libudev
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-06-18 15:45:01 +0200
committerKay Sievers <kay@vrfy.org>2012-06-18 15:58:44 +0200
commitb30b4260255702345eab1ac076bb00869057c16b (patch)
treef6707e6a9912a8bd581b32b5e9b4d2e0995266e1 /src/libudev
parent10b6f904cc58c5a725f123e17819516eca606a3e (diff)
libudev: clarify that udev_monitor_receive_device() is non-blocking
Based on a patch from: Sam Thursfield <ssssam@gmail.com> https://bugs.freedesktop.org/show_bug.cgi?id=51202
Diffstat (limited to 'src/libudev')
-rw-r--r--src/libudev/libudev-monitor.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libudev/libudev-monitor.c b/src/libudev/libudev-monitor.c
index 32319aca7b..2ad9e1c3ad 100644
--- a/src/libudev/libudev-monitor.c
+++ b/src/libudev/libudev-monitor.c
@@ -494,6 +494,11 @@ tag:
*
* Only socket connections with uid=0 are accepted.
*
+ * The monitor socket is by default set to NONBLOCK. A variant of poll() on
+ * the file descriptor returned by udev_monitor_get_fd() should to be used to
+ * wake up when new devices arrive, or alternatively the file descriptor
+ * switched into blocking mode.
+ *
* The initial refcount is 1, and needs to be decremented to
* release the resources of the udev device.
*