public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andy Koppe <andy.koppe@gmail.com>
To: cygwin@cygwin.com
Subject: Re: CYGWIN=tty round 2
Date: Mon, 23 May 2011 11:49:00 -0000	[thread overview]
Message-ID: <BANLkTikxA97jxHkiOXr3DMNgTG4kr0o8uw@mail.gmail.com> (raw)
In-Reply-To: <1306119201.4572.4.camel@YAAKOV04>

On 23 May 2011 03:53, Yaakov wrote:
>> I've summarized the thread where Corinna asked why people used CYGWIN=tty
>> over CYGWIN=notty below.
>>
>> I don't see any showstoppers here so unless people can provide specific
>> examples of how this change would cause hardwhip, we'll be removing
>> CYGWIN=tty in a snapshot near you soon.
>
> I could add XWin:
>
> http://sourceware.org/bugzilla/show_bug.cgi?id=9763

"For some reason which I have yet to investigate, XWin requires a tty to
the log to the terminal.  That means it will output to terminal in VTs,
but will not work in ordinary cmd/bash shells without setting
CYGWIN=tty; instead you will see a cmd window briefly flashing on screen
when launched."

The reason is that XWin.exe is built with -Wl,--subsystem,windows (or
-mwindows, which implies it), which allows it to be invoked directly
from a shortcut or the Run.. dialog without popping up a console or
requiring a console hiding hack. (It's the same for mintty.)

The downside is that Windows also won't hook it up to the parent
process's console, even if there is one, and hence there's nowhere for
Cygwin to hook the standard file descriptors up to.

Having said that, XP introduced the AttachConsole() function, which
allows hooking up to the parent's console by pasing
'ATTACH_PARENT_PROCESS' as the paremeter. It would be very nice if the
Cygwin DLL could try that (followed by CreateFile("CONIN$"/"CONOUT$",
...)) when GetStdHandle returns an invalid handle while initialising
the standard file descriptors.

Andy

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

  parent reply	other threads:[~2011-05-23 11:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-22 21:19 Christopher Faylor
2011-05-23  2:53 ` Yaakov (Cygwin/X)
2011-05-23  6:02   ` Christopher Faylor
2011-05-23 17:27     ` Christopher Faylor
2011-05-23 11:49   ` Andy Koppe [this message]
2011-05-23 15:40     ` Corinna Vinschen
2011-05-23 23:21   ` Ryan Johnson
2011-05-24  6:22     ` Christopher Faylor
2011-05-24  9:54       ` Ryan Johnson
2011-05-23  9:36 ` Sven Köhler
2011-05-23 11:13   ` David Sastre
2011-05-23 21:24 Angelo Graziosi
2011-05-23 21:41 ` Fahlgren, Eric
2011-05-23 22:27 ` Christopher Faylor
2011-05-23 22:01 Angelo Graziosi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTikxA97jxHkiOXr3DMNgTG4kr0o8uw@mail.gmail.com \
    --to=andy.koppe@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).