X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; q=dns; s=
	default; b=ublHK0RuO2ZjzNBz8f/CsZkshlr42M/2wIsq+k+vY2WD86R0FloRH
	Iy+NRdXvJQOBZPna0AYRG1rFk31bmcpwLH0VhBuJvk9pLJWKThQ2ljCmqfD/JxfW
	ZhZg9I9PJs3B4v1sc8P8D5dlfnKSuCg9CuJxeB0Dj3HtObhnEWF0FY=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; s=default;
	 bh=M4glhl0OjktJHo4n0qSFVLqoaAM=; b=pBvh/63FOkF8oDUYsFR6YlL9B4U1
	1va3vTuXyBTUgA8/GeuXMeAJ4kA+YJHdxku1cA4zazI8oKEeWQQ177STg0EDB+i3
	RllAJA1vzKCu54tNC76wWYcN+jvCzNWzZxpa+qo9ReBMyPpYZU7hwZ9tCSc8md8V
	Wx/KkwA+0MMrZic=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Spam-SWARE-Status: No, score=3.1 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,RDNS_NONE,TO_NO_BRKTS_PCNT autolearn=no version=3.3.1
X-Mail-Handler: Dyn Standard SMTP by Dyn
X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information)
X-MHO-User: U2FsdGVkX19CKdHLXeHVHElRol2LwmJX
Date: Fri, 26 Jul 2013 11:27:02 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: ptys - I give up
Message-ID: <20130726152702.GC4495@ednor.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <20130726061334.GA3780@ednor.casa.cgf.cx> <51F21AD0.5090107@dancol.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <51F21AD0.5090107@dancol.org>
User-Agent: Mutt/1.5.20 (2009-06-14)

On Thu, Jul 25, 2013 at 11:44:32PM -0700, Daniel Colascione wrote:
>On 7/25/2013 11:13 PM, Christopher Faylor wrote:
>>It has been suggested here a couple of times that it might be a good
>>idea for Cygwin to fill out the block that it sends to subprocesses
>>with information that fools msvcrt programs into thinking that its ptys
>>are really consoles.
>
>My suggestion was to use the lpReserved2 CRT block to send fake
>filetype information, but there's something better.

Yes, that's why I mentioned your name.

>Ugly, only half-implemented, but better: a hook-based pseudoconsole
>system for Windows.

This is what I was holding out for.  The last time it came up here,
people seemed vehemently opposed to the idea since implementations that
do this (like the Console app and a couple of libraries floating around)
seem to have to poll the console looking for data and that could result
in data loss.

I have had code (not mine) sitting in my Cygwin directory for years
which does this but I couldn't 100% convince myself that the detractors
for this idea weren't right.  Does your code work around this?

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

