www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
Date: | Mon, 14 Dec 2009 07:52:08 +0000 |
Message-ID: | <416096c60912132352n4469ffdai95567a0c5760159@mail.gmail.com> |
Subject: | ttyfier (was: Re: Looking for the 'stdout' of a Windows application) |
From: | Andy Koppe <andy DOT koppe AT gmail DOT com> |
To: | 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-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 |
2009/12/13 Ren=C3=A9 Berber: > And there's the old 'ttyfier' which almost worked: > > http://sources.redhat.com/ml/cygwin/2006-03/msg00164.html > > I say almost because it assumes a fixed terminal size and it fails if > the output exceeds that size, and there where other problems but the OP > might find it good enough for the job. Thanks, I had't heard of ttyfier. Interesting stuff! More comprehensive than my 'conin' attempt because it tranlates output as well as input. The input side is relatively easy to deal with actually, because WriteConsoleInput lets you insert events directly into the console input stream. The output side is much harder because there's no straightforward way to intercept console output before it reaches the screen buffer. Which is why ttyfier (in a similar way as Console2) has to periodically copy the console screen contents to the terminal. I see it injects the actual console processing code (in ttyfier.cc) into the child process (via injlib.cc). Is that actually necessary? I find the console input and output buffers can be accessed from the parent process anyway, assuming of course it's attached to the same console. But the DLL injection makes me wonder: is it possible to override existing functions such as WriteConsole or ReadConsole? 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 |