-
Notifications
You must be signed in to change notification settings - Fork 898
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux: Use poll() even in non-blocking mode
It appears that calls to read() when in non-blocking mode will not set errno to other than EAGAIN when the a device has been disconnected. Note that this is the same errno code set when there is simply no data to return. Make it so that poll() is used, in non-blocking mode, to check the status of the device. In blocking mode though, poll() is not needed.
- Loading branch information
Showing
1 changed file
with
20 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters