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]

rxvt isatty


Hi Cygwin experts,

I was trying to port ivTools (http://merlin.fit.vutbr.cz/wiki/index.php?title=Open_Inventor_Tools) to work smoothly with Cygwin. It works on Cygwin console without problems ($CYGWIN=notty), but rxvt causes all the utilities to freeze.

I found the problem: utilities are testing stdin by isatty. If isatty==false, stdin is used for reading the data. If isatty returns true, there is really bad idea to wait that user will feed the program by complex 3D geometry, and utility is started without reading stdin.

If rxvt is used, isatty returns always false and application does not work as expected. I realized that some advanced console functionality is provided with rxvt (pty, pipes) to overcome the limitations of windows console. My question: Can I find out in if the application is running interactive or not? If it was started like:
app_name.exe < in.txt
echo data | app_name.exe
or
app_name.exe


Another minor question: How to use the advanced functionalities provided by pty and pipes? Just get_osfhandle(fileno(stdin)), ReadFile, and WriteFile?

Really thanks,
John

--
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]