X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <4A89A490.1050108@cwilson.fastmail.fm> Date: Mon, 17 Aug 2009 14:42:24 -0400 From: Charles Wilson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.22) Gecko/20090605 Thunderbird/2.0.0.22 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: [ANNOUNCEMENT] Updated: run-1.1.11-1 References: <200908171705 DOT n7HH5TYe024203 AT StraightRunning DOT com> In-Reply-To: <200908171705.n7HH5TYe024203@StraightRunning.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Colin Harrison wrote: > Hi, > > Chuck wrote: >> So, here's another approach that seems to work for me > > I needed to #include to compile this with MinGW (to find > SHGFI_EXETYPE) > > However, then I get (on Windows 2003) an 'Unable to write to standard error' > with my CUI plink. Okay, so here's another idea: In setup_invisible_console(), there is: /* until we have a mechanism of determining whether a given HANDLE * returned by GetStdHandles actually derives from a console, * unconditionally call FreeConsole() on all OSes under all conditions. * See comments in configure_startupinfo(). */ FreeConsole(); And in configure_startupinfo(): /* foo() is some magic mechanism for determining that the HANDLEs * returned by GetStdHandle() are from a console, and not redirected * or ptys of some sort. If we have such a mechanism, then the * unconditional FreeConsole() at the top of setup_invisible_console() * should be removed. */ /* if (!bForceUsingPipes && foo()) { *bUsingPipes = FALSE; return TRUE; } */ So, does anybody have any suggestions for how to implement foo()? I'm guessing that some of the problems we're seeing are related to the fact that some target apps really expect to have true handles to $CONOUT etc, and get perturbed when they are given something else. If we already HAVE true console handles, then we shouldn't FreeConsole and try to recreate our own... -- Chuck -- 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