delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/03/19/11:37:55

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 AT fit DOT vutbr DOT cz>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
CC: peciva AT fit DOT vutbr DOT cz
Subject: rxvt isatty
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

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/

- Raw text -


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