[lkml]   [2001]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: O_NONBLOCK, read(), select(), NFS, Ext2, etc.
> using the O_NONBLOCK flag, then read() and write() will always return
> immediately and not block the calling process. This does not appear to
> be true; but perhaps I am doing something wrong. If I open() a file (on
> 2.2.18) from a floppy or NFS mount (to test in a slow environment) with
> O_NONBLOCK|O_RDONLY, read() will still block. If I try to select() on
> the file descriptor, select() always returns 0.

The definition of immediate is not 'instant'. Otherwise no I/O system would
ever return anything but -EWOULDBLOCK. Its that it won't wait when there is
no data pending. On a floppy there is always data pending

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:28    [W:0.106 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site