Re: stdin set to nonblocking mode

2005-08-12 Thread Tomasz Zielonka
On Fri, Aug 12, 2005 at 07:43:56AM -0700, John Meacham wrote: > > Hmm, care to give some details as to why you equate "can" with > > "always will" on all platforms? > > Yes. this is guarenteed behavior on pretty much every system. A whole > lot of things would break if it were otherwise. if select

Re: stdin set to nonblocking mode

2005-08-12 Thread John Meacham
On Fri, Aug 12, 2005 at 07:11:24AM -0700, Sigbjorn Finne wrote: > > "Simon Marlow" <[EMAIL PROTECTED]> writes: > > > ... > >No - read() can always return less than the requested amount of data, > >even when not in O_NONBLOCK mode. > > > > Hmm, care to give some details as to why you equate "can"

RE: stdin set to nonblocking mode

2005-08-12 Thread Simon Marlow
On 12 August 2005 15:11, Sigbjorn Finne wrote: > "Simon Marlow" <[EMAIL PROTECTED]> writes: >> > ... >> No - read() can always return less than the requested amount of data, >> even when not in O_NONBLOCK mode. >> > > Hmm, care to give some details as to why you equate "can" with > "always will

Re: stdin set to nonblocking mode

2005-08-12 Thread Sigbjorn Finne
"Simon Marlow" <[EMAIL PROTECTED]> writes: ... No - read() can always return less than the requested amount of data, even when not in O_NONBLOCK mode. Hmm, care to give some details as to why you equate "can" with "always will" on all platforms? --sigbjorn ___

RE: stdin set to nonblocking mode

2005-08-12 Thread Simon Marlow
On 11 August 2005 14:59, Sigbjorn Finne wrote: > "Simon Marlow" <[EMAIL PROTECTED]> writes: >> On 11 August 2005 01:18, John Meacham wrote: >> >>> Why do we set file descriptors to nonblocking mode anyway if they >>> are waited on by a select. there shouldn't be a need to use both >> >> It avoid

Re: stdin set to nonblocking mode

2005-08-11 Thread Sigbjorn Finne
"Simon Marlow" <[EMAIL PROTECTED]> writes: On 11 August 2005 01:18, John Meacham wrote: Why do we set file descriptors to nonblocking mode anyway if they are waited on by a select. there shouldn't be a need to use both It avoids an extra system call per read(), i.e. a single read() instead of

RE: stdin set to nonblocking mode

2005-08-11 Thread Simon Marlow
On 11 August 2005 01:18, John Meacham wrote: > Why do we set file descriptors to nonblocking mode anyway if they are > waited on by a select. there shouldn't be a need to use both It avoids an extra system call per read(), i.e. a single read() instead of select() + read(). And there's a slight c

stdin set to nonblocking mode

2005-08-10 Thread John Meacham
Why do we set file descriptors to nonblocking mode anyway if they are waited on by a select. there shouldn't be a need to use both mechanisms. John -- John Meacham - ⑆repetae.net⑆john⑈ ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@