Re: O_NONBLOCK, read(), select(), NFS, Ext2, etc.
From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Fri Jan 12 2001 - 04:40:55 EST
- Next message: Ralf Baechle: "Re: Subtle MM bug"
- Previous message: Prasong Aroonruviwat: "reset_xmit_timer"
- In reply to: Michael Rothwell: "O_NONBLOCK, read(), select(), NFS, Ext2, etc."
- Next in thread: Michael Rothwell: "Re: O_NONBLOCK, read(), select(), NFS, Ext2, etc."
- Reply: Michael Rothwell: "Re: O_NONBLOCK, read(), select(), NFS, Ext2, etc."
- Reply: Alexander V. Lukyanov: "Re: O_NONBLOCK, read(), select(), NFS, Ext2, etc."
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
> 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 majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
- Next message: Ralf Baechle: "Re: Subtle MM bug"
- Previous message: Prasong Aroonruviwat: "reset_xmit_timer"
- In reply to: Michael Rothwell: "O_NONBLOCK, read(), select(), NFS, Ext2, etc."
- Next in thread: Michael Rothwell: "Re: O_NONBLOCK, read(), select(), NFS, Ext2, etc."
- Reply: Michael Rothwell: "Re: O_NONBLOCK, read(), select(), NFS, Ext2, etc."
- Reply: Alexander V. Lukyanov: "Re: O_NONBLOCK, read(), select(), NFS, Ext2, etc."
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
This archive was generated by hypermail 2b29
: Mon Jan 15 2001 - 21:00:33 EST