X-Spam-Check-By: sourceware.org
Message-ID: <45FEBC3E.4080800@fit.vutbr.cz>
Date: Mon, 19 Mar 2007 17:37:18 +0100
From: PCJohn <peciva@fit.vutbr.cz>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
To: cygwin@cygwin.com
CC: peciva@fit.vutbr.cz
Subject: rxvt isatty
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 7bit
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

Hi Cygwin experts,

I was trying to port ivTools 
(http://merlin.fit.vutbr.cz/wiki/index.php?title=Open_Inventor_Tools) to 
  work smoothly with Cygwin. It works on Cygwin console without problems 
($CYGWIN=notty), but rxvt causes all the utilities to freeze.

I found the problem: utilities are testing stdin by isatty. If 
isatty==false, stdin is used for reading the data. If isatty returns 
true, there is really bad idea to wait that user will feed the program 
by complex 3D geometry, and utility is started without reading stdin.

If rxvt is used, isatty returns always false and application does not 
work as expected. I realized that some advanced console functionality is 
provided with rxvt (pty, pipes) to overcome the limitations of windows 
console. My question: Can I find out in if the application is running 
interactive or not? If it was started like:
app_name.exe < in.txt
echo data | app_name.exe
or
app_name.exe

Another minor question: How to use the advanced functionalities provided 
by pty and pipes? Just get_osfhandle(fileno(stdin)), ReadFile, and 
WriteFile?

Really thanks,
John

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

