www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <Pine.LNX.4.64.1008271822560.25309@unix11.andrew.cmu.edu> |
References: | <Pine DOT LNX DOT 4 DOT 64 DOT 1008271822560 DOT 25309 AT unix11 DOT andrew DOT cmu DOT edu> |
Date: | Sat, 28 Aug 2010 05:37:12 +0100 |
Message-ID: | <AANLkTimbL80QZB3h+OHe-X_R_LL0OfcyExhuZq4c9UMT@mail.gmail.com> |
Subject: | Re: Support for the TIOCINQ ioctl |
From: | Andy Koppe <andy DOT koppe AT gmail DOT com> |
To: | brennan AT sellner DOT org, cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
On 27 August 2010 23:31, Brennan Peter Sellner wrote: > By any chance, has support for the TIOCINQ ioctl on file descriptors (used > to check how many bytes of data are in the input buffer) been added to > Cygwin? =C2=A0It hadn't as of 2004: > > =C2=A0http://sourceware.org/ml/cygwin/2004-07/msg00910.html It's still implemented only for serial devices. > ...but I haven't found any newer references to it. =C2=A0I'm inferring th= at it's > not supported, as ioctl(fd, TIOCINQ, &available) (where fd is a valid file > descriptor, and available is a long) fails, with errno set to 'invalid > argument'. =C2=A0I'm running Cygwin 1.7.6 on Vista. > > I'm hoping I'm missing something... =C2=A0Is there an alternative way to = check > the number of bytes on an fd's input buffer in Cygwin? What's your use case? And on what sort of fd? select() of course can tell you whether there are any bytes available to be read from an fd, and usually that's all one needs to know. Andy -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |