Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3FF21938.CD06BE73@dessent.net> Date: Tue, 30 Dec 2003 16:32:56 -0800 From: Brian Dessent Organization: My own little world... MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: problem comport, iocl and FIONREAD References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.linuxsv3.net X-AntiAbuse: Original Domain - cygwin.com X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - dessent.net X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com 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/