delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/09/22/19:46:31

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_50,KHOP_THREADED,RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <505E4DBE.5050200@tlinx.org>
Date: Sat, 22 Sep 2012 16:46:06 -0700
From: Linda Walsh <cygwin AT tlinx DOT org>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Win PTY library.
References: <CA+sc5mnmVykGQLMvf3GXnf5RUM3SHVP6C5PreJ+F4dSksX3+Sw AT mail DOT gmail DOT com> <20120915162136 DOT GB25529 AT ednor DOT casa DOT cgf DOT cx> <5057036D DOT 3080304 AT dancol DOT org> <5057254C DOT 4040405 AT cwilson DOT fastmail DOT fm> <CAKw7uVjiM-M8xd1o24HAb4-axTpOzugnW1KOFm05DOVCN9+6Vg AT mail DOT gmail DOT com> <CAKw7uVgZEezTZZ19tXbi=KpySzSxFEbZysUSQsrqOWiVh_ttMg AT mail DOT gmail DOT com>
In-Reply-To: <CAKw7uVgZEezTZZ19tXbi=KpySzSxFEbZysUSQsrqOWiVh_ttMg@mail.gmail.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

Václav Zeman wrote:
> I think that the difference is that PTY is a stream of commands that get
> interpreted, OTOH, polled Windows console can provide only a snapshot at
> some point in time. It seems that it would be hard to produce faithful
> stream of commands from this console snapshot. Because Console2 is only
> visualizing the snapshot in its own GUI window, it does not matter that it
> is doing that by snapshotting the hidden console. But for the PTY
> abstraction, a faithful chain of commands seems necessary. I think that any
> such polling based implementation could miss some transitions in the PTY
> state in between the polls.
----
	I'd have to agree with Václav.

If you are using the pty interactively, it won't be problem, BUT
programs use pty's to drive other programs, programatically, and
rely on "pipe" type speeds to be able to communicate to them.

Imagine rsync, which goes over pipes -- if it sprayed through data
at full speeds, that only got picked up every 100ms -- i'd imagine
alot more than a screen full of data would go by in the transfer.

I am working on a program right now that starts a inspection tool
then issues commands to it -- I want to be able to query about
100-200K files... if those take even a full ms. each, I'm
looking at over 3 minutes.  If polling resulted in me getting
back results every 10ms, it'd be over a half an hour...way
not good.

Won't even think about 100ms / result..... tried... now my head hurts.

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019