How to check if a file descriptor has any data available?

Posted by StackedCrooked on Stack Overflow See other posts from Stack Overflow or by StackedCrooked
Published on 2010-05-04T09:34:27Z Indexed on 2010/05/04 9:38 UTC
Read the original article Hit count: 198

Filed under:
|

I'd like to know if a fd has data available for reading. I have tried ioctl with FIONREAD but that results in a "Operation not supported error". Any ideas?

© Stack Overflow or respective owner

Related posts about posix

Related posts about c