This is the mail archive of the
mailing list for the Cygwin project.
Re: [RFA] patch for run.exe -- ATTN: ago
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
> > 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...
|\ _,,,---,,_ email@example.com | firstname.lastname@example.org
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