This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 1.7.0: read() blocking with VMIN = VTIME = 0


On Tue, Jul 28, 2009 at 1:00 PM, daniel åkerud<daniel.akerud@gmail.com> wrote:
> With my example program below the read() is blocking even though
> canonical input is set and VMIN = VTIME = 0.

I mean non-canonical here. *ups*

> It is supposed to act in a non-blocking way.
>

And this is from the libc documentation:
http://www.gnu.org/s/libc/manual/html_node/Noncanonical-Input.html#Noncanonical-Input

17.4.10 Noncanonical Input
...
Both MIN and TIME are zero.
In this case, read always returns immediately with as many characters
as are available in the queue, up to the number requested. If no input
is immediately available, read returns a value of zero.

BR/Daniel

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]