Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbosgd!gatech!seismo!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: net.unix-wizards Subject: Re: cbreak problem Message-ID: <773@brl-smoke.ARPA> Date: Sun, 9-Feb-86 06:39:27 EST Article-I.D.: brl-smok.773 Posted: Sun Feb 9 06:39:27 1986 Date-Received: Tue, 11-Feb-86 06:35:41 EST References: <299@ucbjade.BERKELEY.EDU> Reply-To: gwyn@brl.ARPA Organization: /usr/local/lib/news/organization Lines: 12 In article <299@ucbjade.BERKELEY.EDU> cnrdean@ucbtopaz.BERKELEY.EDU () writes: >I am porting a program on to a Berkeley 4.2 Vax, and I'm having >trouble with my cbreak mode: I need to process characters as they come >in. My problem is that when I try to print the characters, they don't >get printed at the point that I request them to, unless I put a fflush >in. I thought that when I was in cbreak mode, putchar() would show up >immediately, without fflushing. No, STDIO does not pay attention to the terminal mode. By default, output to a terminal (except stderr) will be line-buffered. You can override this by invoking setbuf(stdout,(char *)NULL) before doing any output.