X-Recipient: archive-cygwin AT delorie DOT com 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 MIME-Version: 1.0 In-Reply-To: <1306119201.4572.4.camel@YAAKOV04> References: <20110522211906 DOT GA13428 AT ednor DOT casa DOT cgf DOT cx> <1306119201 DOT 4572 DOT 4 DOT camel AT YAAKOV04> Date: Mon, 23 May 2011 12:49:36 +0100 Message-ID: Subject: Re: CYGWIN=tty round 2 From: Andy Koppe To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 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