From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3653 invoked by alias); 23 May 2011 11:49:53 -0000 Received: (qmail 3644 invoked by uid 22791); 23 May 2011 11:49:52 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-qw0-f43.google.com (HELO mail-qw0-f43.google.com) (209.85.216.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 23 May 2011 11:49:37 +0000 Received: by qwf6 with SMTP id 6so3528139qwf.2 for ; Mon, 23 May 2011 04:49:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.40.211 with SMTP id l19mr1661094qae.46.1306151376596; Mon, 23 May 2011 04:49:36 -0700 (PDT) Received: by 10.229.43.18 with HTTP; Mon, 23 May 2011 04:49:36 -0700 (PDT) In-Reply-To: <1306119201.4572.4.camel@YAAKOV04> References: <20110522211906.GA13428@ednor.casa.cgf.cx> <1306119201.4572.4.camel@YAAKOV04> Date: Mon, 23 May 2011 11:49:00 -0000 Message-ID: Subject: Re: CYGWIN=tty round 2 From: Andy Koppe To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-05/txt/msg00330.txt.bz2 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