Cygwin: serial: try fix o_nonblock
This commit is contained in:
parent
bd22d2f91e
commit
57a80207ff
@ -68,6 +68,16 @@ fhandler_serial::raw_read (void *ptr, size_t& ulen)
|
||||
goto err;
|
||||
else if (ev)
|
||||
termios_printf ("error detected %x", ev);
|
||||
else if (is_nonblocking ())
|
||||
{
|
||||
if (!st.cbInQue)
|
||||
{
|
||||
tot = -1;
|
||||
set_errno (EAGAIN);
|
||||
goto out;
|
||||
}
|
||||
inq = st.cbInQue;
|
||||
}
|
||||
else if (st.cbInQue && !vtime_)
|
||||
inq = st.cbInQue;
|
||||
else if (!is_nonblocking () && !overlapped_armed)
|
||||
|
Loading…
Reference in New Issue
Block a user