Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: From: Glen Coakley To: cygwin AT cygwin DOT com Subject: RE: Buffered IO curiosity effects non-CYGWIN programs. Date: Tue, 24 Jul 2001 09:14:58 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Are you certain this is not a feature of the terminal system in Cygwin? It would be my bet that it does buffering by default and cmd.exe (though it is undoubtably designed and written so well, ahem!) does not. ________________________________ Glen Coakley, Sr. Software Engineer MQSoftware Inc., (763) 543-4845 "Tinkero ergo sum." -- Chuck Murcko > -----Original Message----- > From: Ed Bradford [mailto:egb AT us DOT ibm DOT com] > Sent: Tuesday, July 24, 2001 9:07 AM > To: cygwin AT cygwin DOT com > Subject: Buffered IO curiosity effects non-CYGWIN programs. > > > There were no replys to my question about buffered IO. > > Write a 14 line program reading lines from stdin and printing them to > stdout. Compile with Microsoft CL.exe. Run the program from > bash and it > runs as if buffering were turned on. It doesn't recognize the > console as an > interactive output requiring immediate flushing. Run the very > same program > from cmd.exe and it works correctly. > > This is a bug in something because it effects programs that are not > compiled with CYGWIN. Has anyone seen this problem and is > there any type of > resolution? > > Thank you. > Ed Bradford > > #include > #include > main() > { > char buf[128]; > > while(fgets(buf,sizeof(buf),stdin)) { > buf[127] = 0; > printf("%s\n",buf); > if(buf[0] == 'q') > break; > } > return 0; > } > > > Your Windows 2000 Arborist and Linux Performance Comparisonist > T/L 589-4410; Outside: 1-919-993-4410 > egb AT us DOT ibm DOT com > > > > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Bug reporting: http://cygwin.com/bugs.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/