Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site cubsvax.UUCP Path: utzoo!linus!decvax!harpo!floyd!cmcl2!rocky2!cubsvax!noel From: noel@cubsvax.UUCP Newsgroups: net.unix-wizards Subject: Re: stdio buffering considered harmful Message-ID: <89@cubsvax.UUCP> Date: Fri, 5-Aug-83 14:48:02 EDT Article-I.D.: cubsvax.89 Posted: Fri Aug 5 14:48:02 1983 Date-Received: Sat, 6-Aug-83 08:26:50 EDT References: <460@ritcv.UUCP> Organization: Columbia Univ Biology, New York City Lines: 18 How about a load-time option which would make stdio buffer line-by line? One could "cc dumb.c -lflush" and /lib/libflush.a would be a version of some subset of stdio which did whatever one considers best -- I vote for either line-by-line or per-printf flushes on ALL output files. This would obviate the need for inserting fflush()es to extract the output of a program which bombs due to illegal behaviour like "bus error" "segmentation violation", funny asynchronous behaviour, etc., etc.. Of course if you really felt you needed to optimize for file writes and only flush for pipes and ttys, you could have yet another version of the load library which did that. Of course the different versions of the library would be #ifdef compilations. -- Noel Kropf harpo!rocky2!cubsvax!noel 1002 Fairchild philabs!cmcl2!rocky2!cubsvax!noel Columbia University New York NY 10027 212-280-5517