Anyone know how to achieve overlapped File IO on Linux (RedHat 6.2)? I tried open with O_NONBLOCK, and tested for EAGAIN / EWOULDBLOCK, but could not raise that error on a read or a write (1MB buffer on a 32MB file). I also tried fcntl with O_NONBLOCK.
The only references to O_NONBLOCK I can find refer to sockets, FIFOs, and terminals. Are these the only devices which support it? I also read that non-blocking IO is only available on STREAMS devices, but RedHat Linux does not include STREAMS !
I guess Unix File IO is supposed to be asynchronous, but there is a significant delay in transferring, say, 1MB buffer compared to < 4KB. The delay could well be in kernel finding buffer space, but nevertheless I dont want to wait around while it does it!