From: Eric Wong Date: 2011-03-03T04:37:07+09:00 Subject: Re: question: threads behaviour Robert Klemme wrote: > On Tue, Mar 1, 2011 at 11:13 PM, Eric Wong wrote: > > Filesystem IO (regular files) doesn't return EAGAIN (at least not on > > systems I'm familiar with). > > http://www.kernel.org/doc/man-pages/online/pages/man2/read.2.html#ERRORS From http://www.kernel.org/doc/man-pages/online/pages/man2/read.2.html#NOTES Many file systems and disks were considered to be fast enough that the implementation of O_NONBLOCK was deemed unnecessary. So, O_NONBLOCK may not be available on files and/or disks. From what I've seen, setting O_NONBLOCK doesn't error, but read() never actually respects it on ext{2,3,4} even when a disk is horribly slow. -- Eric Wong