X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <4A8D6510.1050309@gmail.com> Date: Thu, 20 Aug 2009 16:00:32 +0100 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: [ANNOUNCEMENT] Updated: run-1.1.11-1 References: <200908171705 DOT n7HH5TYe024203 AT StraightRunning DOT com> <4A89A490 DOT 1050108 AT cwilson DOT fastmail DOT fm> <4A8D429A DOT 1070306 AT byu DOT net> <4A8D4B6A DOT 9080706 AT gmail DOT com> <20090820143940 DOT GA13570 AT ednor DOT casa DOT cgf DOT cx> In-Reply-To: <20090820143940.GA13570@ednor.casa.cgf.cx> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Christopher Faylor wrote: > Is there something wrong with Cygwin's code for determining if a handle is a > console? > > ... > if (GetConsoleScreenBufferInfo (handle, &buf)) > { > ... > } > else if (GetNumberOfConsoleInputEvents (handle, (DWORD *) &buf)) > { > ... > } > > It's been working pretty well for centuries. Can't see why it wouldn't be ok. Both those functions return zero (and GetLastError() == STATUS_INVALID_HANDLE) if what you pass isn't a console handle. cheers, DaveK -- 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