Messages in this thread | | | Date | Tue, 21 Jun 2005 12:44:14 -0700 (PDT) | From | Christoph Lameter <> | Subject | Re: -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/
| |