This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rxvt isatty


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]