Re: -mm -> 2.6.13 merge status

Christoph Lameter
2005-06-21T19:46:10Z

On Tue, 21 Jun 2005, Robert Love wrote:

> On Tue, 2005-06-21 at 12:22 -0700, Christoph Lameter wrote:
>
> > I noticed that select() is not working on real files. Could inotify
> > be used to fix select()?
>
> Select the system call? It should work fine. ;-)

Hmmm. I just wrote an app that uses select to do essentially a "tail"
waiting for new content in a log file. The file descriptors for real disk
files are always ready even if there is no content available for the
application.

The file is positioned at the end of the file after open via lseek.
select tells me that data is available but the read() returns zero bytes.

The current fix on the app level is to checking if useful work was
done as a result of "READY" file descriptors. If the read() operations
do not return any data then the app will simply sleep for a couple of
seconds. So the app degenerates to a kind of poll mode if disk files are
used.