Summary: | Be more clear that udev_monitor_receive_device() is non-blocking | ||
---|---|---|---|
Product: | systemd | Reporter: | Sam Thursfield <ssssam> |
Component: | general | Assignee: | systemd-bugs |
Status: | RESOLVED FIXED | QA Contact: | systemd-bugs |
Severity: | minor | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Patch to fix doc for udev_monitor_receive_device()
Cleaner patch |
Description
Sam Thursfield
2012-06-18 04:37:57 UTC
Created attachment 63173 [details] [review] Patch to fix doc for udev_monitor_receive_device() Created attachment 63174 [details] [review] Cleaner patch Always proof-read patches before submitting + * 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! |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.