in reply to Re: nonblocking I/O - testing whether file has more data to read
in thread nonblocking I/O - testing whether file has more data to read

Interesting stuff, if painfully low level. However, characteristics of individual ioctl calls are device-dependent, and that FAQ mentions lower down:

FIONREAD requires a filehandle connected to a stream, meaning that sockets, pipes, and tty devices work, but not files.

Since I am reading plain files, that isn't going to work for me.

Hugo

  • Comment on Re: Re: nonblocking I/O - testing whether file has more data to read
  • Download Code