From: gwatts AT fnal DOT gov (Gordon Watts Brown University) Subject: NT Programs that read input fail under b19 7 Mar 1998 16:23:20 -0800 Message-ID: <01IU9Y693DY2002QT8.cygnus.gnu-win32@FNAL.FNAL.GOV> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit To: gnu-win cygnus mailing list Hi, I've written a short program, in msvc++, that works fine when run from the dos shell, but fails when run from bash 2.01 (b19, no coolview). The program prints a message to stdout and then tries to read something from stdin. The print works just fine, but nothing gets read in (I suspect it sees an end of file). I've include the file below. Build this in msvc++ 5.0 as a console application. After doing "chmod a+x simple_io.exe" you should be able to run it from the bash command line. It will print out everything, but never give you a chance to enter any input. Running from the DOS prompt will work fine. I think all of this worked just fine under b18. I suspect the thing that makes this fail is the same thing that makes other programs like python fail (as reported eariler on this list). How hard is it to debug something like the cygwin (or this problem)? I suspect I can build the cygwin dll, but I'm not confident of my debugging capabilities with... gee, I don't even know what tool I would use under cygwin (I've never really used unix heavily... uh, dbx? Mostly I use the MS debugger. :-)). Cheers, Gordon. P.S. I tested this guy with the latest coolview patches. // // simple_io.cpp // // The b19 release seemed to have disabled reading input from non-cygwin apps. // This guy attempts to reproduce the problem // #include int main() { std::cout << "hi there!" << std::endl; std::cout << "Enter something: "; char buffer[1000]; std::cin >> buffer; std::cout << "You said: " << buffer << std::endl; std::cout << "Bye." << std::endl; return 0; } - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".