delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/05/11/02:35:40

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Wed, 11 May 2011 08:34:33 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Who's using "CYGWIN=tty" and why?
Message-ID: <20110511063433.GD28594@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20110510211800 DOT CCBDF9D5A21 AT mail2 DOT intersystems DOT com>
MIME-Version: 1.0
In-Reply-To: <20110510211800.CCBDF9D5A21@mail2.intersystems.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On May 10 17:17, Len Giambrone wrote:
> This time with a subject; apologies if the first one gets through.
> 
> We use windows native jam which spawns any number of cmd, cygwin, or studio processes.
> If we spawn it from a Cygwin terminal that doesn't have CYGWIN=tty set, we get:

I assume that most people, like me, don't even know what jam is.
Searching for jam on google reminds of needles and haystacks.

> The handle is invalid.
> 
> Every time output goes to the screen.
> If we use CYGWIN=tty, we get normal output.

Kind of weird.  The difference is that in tty mode the stdio handles are
pipes, while in the notty case the stdio handles are console handles.
Usually native Windows applications shouldn't see a difference and even
work *better* in notty mode.  Actually, if it works with native Win32
processes in a cmd windows, there's no reason it shouldn't work with
Cygwin processes in a cmd window in notty mode, since the handles are
the same, console handles.

Either there's a function call in jam which doesn't work with console
handles (a native NT call perhaps?) or jam doesn't expect cmd handles if
you start the application differently.  Did you ever try to start the
Cygwin process using "cmd /c"?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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