delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/05/19/09:15:51

X-Spam-Check-By: sourceware.org
Date: Fri, 19 May 2006 09:15:06 -0400 (EDT)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
cc: cygwin AT cygwin DOT com
Subject: Re: [RFA] patch for run.exe -- ATTN: ago
In-Reply-To: <446D84F0.80609@cwilson.fastmail.fm>
Message-ID: <Pine.GSO.4.63.0605190911070.16403@access1.cims.nyu.edu>
References: <446C1803 DOT 2050901 AT cwilson DOT fastmail DOT fm> <1147949399 DOT 27157 DOT 38 DOT camel AT zipoli DOT prudsys DOT com> <446D84F0 DOT 80609 AT cwilson DOT fastmail DOT fm>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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 Fri, 19 May 2006, Charles Wilson wrote:

> Alexander Gottwald wrote:
>
> > Actually GetStdHandle seems to work with pipes.
> >
> > run cat foo | less cat foo | run cat | less
> > but this does exit immediatly
> > run cat | less
>
> ...
>
> > So the invisible console should provide stdin, stdout and stderr where
> > stdout and stderr will discard any written data and stdin should never
> > return data on read.
>
> Nor should the "stdin" pipe ever be "ready" if select() is called on its
> read end.  I'm sure that ought to be true -- as long as run doesn't
> stuff any data into the write end of it.
>
> > creating a pipe for stdin could be useful. maybe creating one for
> > stdout and stderr which is always read too.
> > [snip code]
>
> Unfortunately this doesn't solve my problem (after disabling the
> setup_invisible_console() call).  There are two reasons:
>
> (1) as it happens, GetStdHandle does *not*, in fact, return
> INVALID_HANDLE_VALUE.  I thought it would given my reading of the docs.  I
> thought it DID when I tested it.  But I was wrong.  It's returning some
> non-zero, non-INVALID_HANDLE_VALUE-value.  I have no idea why.

Isn't there a way to retrieve handle information to find out what the
handle refers to?

> (2) Even if I force your pipe code to activate (by explicitly assigning
> INVALID_HANDLE_VALUE to start.hStdInput and friends at the top of the
> code block above), rxvt-unicode-X still goes haywire.
>
> Sigh.  Hopefully I'll have time to look into this more over the weekend.
> Maybe something like
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/creating_a_child_process_with_redirected_input_and_output.asp
>
> > Anyway, if the allocated hidden console does not interfere with the
> > pipes i'm going to add it.
>
> ???  the pipe code?  or the setup_invisible_console code?  or both?
>
> > Is it possible to create a console on win9x and hide it again. This
> > will flash, but at least it does work.
>
> Well, yeah...but then you might as well not even use run.exe for
> launching rxvt or rxvt-unicode.  They can hide their console all by them
> selves, if you don't mind the brief flash.

Yes, but run might be used to hide programs other than rxvt...
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

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