delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Importance: | Normal |
Subject: | Buffered IO curiosity effects non-CYGWIN programs. |
To: | cygwin AT cygwin DOT com |
X-Mailer: | Lotus Notes Release 5.0.7 March 21, 2001 |
Message-ID: | <OFB290CEF0.D55DD68C-ON85256A93.004D3ED8@raleigh.ibm.com> |
From: | "Ed Bradford" <egb AT us DOT ibm DOT com> |
Date: | Tue, 24 Jul 2001 10:06:36 -0400 |
X-MIMETrack: | Serialize by Router on D04NM302/04/M/IBM(Release 5.0.6 |December 14, 2000) at |
07/24/2001 10:06:37 AM | |
MIME-Version: | 1.0 |
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 <windows.h> #include <stdio.h> 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |