delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/03/21/16:21:06

X-Spam-Check-By: sourceware.org
Date: Wed, 21 Mar 2007 17:20:45 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
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
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
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 <file.txt
>//   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 <file.txt
>//   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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019