delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/02/04/08:33:46.1

From: ngo AT wossolit DOT teles DOT de (Nils Goesche)
Subject: bash-shell output
4 Feb 1998 08:33:46 -0800 :
Message-ID: <ulnvq97vd.fsf.cygnus.gnu-win32@teles.de>
To: gnu-win32 AT cygnus DOT com
Cc: ntemacs-users AT cs DOT washington DOT edu

Hi!

The following program doesn't work properly when run from bash
(with `M-x shell' from within Emacs):

#include <stdio.h>

int main()
{
	int i;

	printf("Enter number: ");
	/* fflush(NULL); */
	scanf("%d", &i);
	printf("Got %d.\n", i);
	return 0;
}

You have to uncomment that fflush-line. But the usual shells
like command.com or 4nt don't need that line. This is somewhat
annoying. Can I at least force the shell somehow to flush
input/output buffers? Some other programs are just unusable 
because of this behavior.

-- 
Nils Goesche
My obscure opinions are my very own.

-
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".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019