[systemd-bugs] [Bug 51202] Be more clear that udev_monitor_receive_device() is non-blocking
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Jun 18 06:56:02 PDT 2012
https://bugs.freedesktop.org/show_bug.cgi?id=51202
Kay Sievers <kay.sievers at vrfy.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #3 from Kay Sievers <kay.sievers at vrfy.org> 2012-06-18 06:56:02 PDT ---
+ * It is an error to call this function if there is no data available.
+ * The function will return #NULL in this case. You should monitor the
+ * file handle returned by udev_monitor_get_fd() to ensure data is available
+ * before calling. Note that the behaviour of this function changed in
+ * libudev 171. Code that assumes this function will block should be changed
+ * to use poll().
Hmm, it's not really an *error*, sure, also not very useful, but it just
returns EAGAIN and NULL.
Also users are free to change the flags of the file descriptor to blocking
mode.
I added a sentence to explain that.
Thanks!
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the systemd-bugs
mailing list