lkml.org 
[lkml]   [2005]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: -mm -> 2.6.13 merge status
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.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-21 21:52    [W:0.429 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site