X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Thu, 15 Jul 2010 10:52:52 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Problem with select() on console Message-ID: <20100715145252.GB25506@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <4C3E59E3 DOT 4050003 AT hones DOT org DOT uk> <20100715054952 DOT GB10561 AT trixie DOT casa DOT cgf DOT cx> <4C3EF7BB DOT 4040204 AT hones DOT org DOT uk> <4C3F02F7 DOT 5040301 AT hones DOT org DOT uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C3F02F7.5040301@hones.org.uk> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Thu, Jul 15, 2010 at 01:45:43PM +0100, Cliff Hones wrote: >Cliff Hones wrote: >> I must look at the console source... > >And now I have, and I see that fhandler_console does its own line >editing, so is perfectly aware of the input line state. So blocking as >soon as any key is typed seems a shortcoming of cygwin, not windows? You could say that about just about everything that Cygwin has problems with. For instance, the fact that Cygwin's ptys aren't properly recognized by pure Windows programs is a limitation of Cygwin too. It really isn't an interesting distinction since it boils down to a cost/benefit situation. >I see there may be a difficulty with storing incomplete lines, or with >synchronizing processing of new console events seen by different cygwin >threads/processes, and it may be deemed unworthwhile (especially as it >doesn't seem to be a frequently raised question), but to it seems >doable. The readahead stuff in fhandler_console.cc (which I wrote) was intended to be used for small amounts of data. Extending it to properly handle cooked mode would be quite an undertaking. Since, as Andy pointed out, most sophisticated applications used something like readline, this has not come up previously that I can recall. So, this is a PTC case. cgf -- 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