| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| X-Originating-IP: | [128.239.3.246] |
| From: | "Wirawan Purwanto" <wirawan AT camelot DOT physics DOT wm DOT edu> |
| To: | <cygwin AT cygwin DOT com> |
| Subject: | Strange behavior of MSVC's printf under cygwin shell? |
| Date: | Mon, 25 Mar 2002 16:38:27 -0500 |
| MIME-Version: | 1.0 |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4807.1700 |
| Message-ID: | <LAW2-OE53WO6hm8Ua8d000018b3@hotmail.com> |
| X-OriginalArrivalTime: | 25 Mar 2002 21:37:40.0726 (UTC) FILETIME=[4A49B160:01C1D445] |
Hi,
Why does the screen output displayed using MSVC's printf subroutine not get
shown immediately under Cygwin shell (bash, specifically)? Rather, it would
wait for a long time before showing the text lines (many lines at once). How
to change this behavior?
I used the following (simple) code as an example:
#include<stdio.h>
int main() {
for (int i=0; i < 50; ++i) {
printf("%d %d\n", i, i*i);
for (int j=0; j < 10000000; ++j); /* just for delay */
}
return 0;
}
Try to compile it using: gcc -mno-cygwin sample.c , then run it: ./a.exe. If
you remove "-mno-cygwin", this strange behavior disappears. Under MS-DOS
shell, this behavior does not exist.
Thanks,
Wirawan
--
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 |