X-Spam-Check-By: sourceware.org Date: Wed, 21 Mar 2007 17:20:45 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: rxvt isatty Message-ID: <20070321212045.GA1318@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <460159FB DOT 3020408 AT fit DOT vutbr DOT cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <460159FB.3020408@fit.vutbr.cz> User-Agent: Mutt/1.5.11 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 Wed, Mar 21, 2007 at 05:14:51PM +0100, PCJohn wrote: >I found the possible solution. I have just a question whether Cygwin's >pty's behaviour is changed often and whether it should work throughout >the many past releases of Cygwin. Hmm. You quoted my message but ignored it. >On MSVC, it is possible to use GetNamedPipeInfo() and >GetNamedPipeHandleState() and based on their behaviour, to distinguish >between all different possibilities: >// >// results from rxvt: >// >// ./pipetest >// stdin: SERVER_END pipe, name: John >// >// ./pipetest // stdin: pipe functions failed - it is a standard file >// >// echo 123 | ./pipetest >// stdin: SERVER_END pipe, without name >// >// >// results from Windows console: >// >// pipetest >// stdin: no pipes >// >// pipetest // stdin: no pipes >// >// echo 123 | ./pipetest >// stdin: SERVER_END pipe, without name >// > >Note for others interested: It is necessary to pass NULL params to >GetNamedPipeHandleState in different cases, otherwise the function >fails. I found my MSDN doc not much clear at this point. If you want to write code which thinks that a pipe on stdin is the same thing as a tty then that's great. We really aren't interested in discussing ways to circumvent the Cygwin DLL. Please find some other forum if you need to discuss this further. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/