X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,FB_WORD1_END_DOLLAR,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <4A8D7A1D.9040605@cwilson.fastmail.fm> Date: Thu, 20 Aug 2009 12:30:21 -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> <4A89A490 DOT 1050108 AT cwilson DOT fastmail DOT fm> <4A8D429A DOT 1070306 AT byu DOT net> <4A8D4B6A DOT 9080706 AT gmail DOT com> <20090820143940 DOT GA13570 AT ednor DOT casa DOT cgf DOT cx> <4A8D6510 DOT 1050309 AT gmail DOT com> In-Reply-To: <4A8D6510.1050309@gmail.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 This is all very interesting, and responds to a question that I raised -- but it's been overcome by events. In run-1.1.12, we no longer care whether the current process's (that is, run's) GetStdHandles are from a console or not -- not even in commented-out code. Instead, we care whether the current process HAS a console at all. If it does, then we [++] open new inheritable handles to CONIN$ and CONOUT$, and pass those to the child. This means that 'run foo >/dev/null' (that is, redirecting run's stdout to /dev/null, and expecting foo's stdout to also be redirected) -- but I don't think it worked in the past anyway. Instead, what now happens is foo's stdout will unconditionally go to the CONOUT$ of the (hidden) console. (same deal with 'run foo >somefile' -- but again, I don't think that ever worked before). So, what's the effective difference between sending foo's output to /dev/null, and sending it to a hidden console? In both cases it never blocks, and is always writable (in the latter case, because the console's message handler always drains the queue). However, I appreciate all the info. If there are problems with run-1.1.12, then maybe [++] is the place to add in an additional check concerning the handles returned by GetStdHandle(), using code similar to the ideas expressed in this subthread. -- 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