Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!rutgers!mailrus!ames!ncar!tank!oddjob!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.wizards Subject: Re: Line Buffered output Message-ID: <13866@mimsy.UUCP> Date: 4 Oct 88 22:19:00 GMT References: <411@marob.MASA.COM> <178@arnold.UUCP> <3442@crash.cts.com> <1686@ficc.uu.net> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 26 >>In article <1613@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes: >>>The problem of handling stdout and stdin is a solved >>>problem: do a flushbuf on all interactive streams whenever you do a >>>fillbuf on any interactive stream. ... >In article <13765@mimsy.UUCP> I wrote: >>`Backwards compatibility means we get to keep all our old mistakes.' In article <1686@ficc.uu.net>, peter@ficc.uu.net (Peter da Silva) writes: >But it's *Berkeley* that had the smart stdio in the first place! I know >that I ran into this on 2.something at Berkeley in 1980 and thought it >was way-cool. When and why was it removed, or did it just not get migrated >to 4BSD? I presume by `it' you mean that reading from stdin flushes stdout. That is still there; the difference between REALLY line buffered and fully-buffered-but-flushed-on-input can be seen with the following program: main() { putchar('g'); putchar('o'); putchar('\n'); for (;;); } 2BSD and 4BSD will both print `go\n' if stdout is a terminal, while under what I think you were proposing, you would never see anything. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris