This is the mail archive of the cygwin@cygwin.com 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: problem comport, iocl and FIONREAD


Arash Partow wrote:
> 
> Hi all,
> 
> I'm seeing a problem with ioctl and FIONREAD, I use the
> following code to check if there are any bytes in the
> input buffer of a comport.
> ie:

Check the return value of ioctl(), I bet it's returning error and
setting EINVAL.  I think you want TIOCINQ instead.  At least,
fhandler_serial.cc recognises such an ioctl, but not FIONREAD.

Brian

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


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