Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!harpo!floyd!vax135!ukc!root44!pdl From: pdl@root44.UUCP (Dave Lukes) Newsgroups: net.unix-wizards Subject: Re: stdio buffering considered harmful Message-ID: <4118@root44.UUCP> Date: Mon, 1-Aug-83 10:49:25 EDT Article-I.D.: root44.4118 Posted: Mon Aug 1 10:49:25 1983 Date-Received: Tue, 2-Aug-83 11:11:27 EDT References: sri-arpa.3360 Lines: 16 Agreed: stdio's buffering is painful (BTW: to all of you out there in the dark ages: SIII and upwards ALSO have an m4 flag to do line buffering (yuk)). The problem with the environment hack is that it doesn't really offer fine enough control, (you probably don't want any temp. files etc. being line buffered just because the standard output is a pipe). I suppose it could be extended to allow you to say `gimme block buffering on files, single character buffering on terminals and line buffering on pipes', but the syntax would no doubt be so horrendous that no-one would use it. (BTBTW: you can GUESS if it's a pipe by doing a seek on it and seeing if you get errno == ESPIPE, or, with SIII (rah, rah), you can see if ((statbuf.st_mode&S_IFMT) == S_IFIFO)). 'Nuff said (he he) Dave Lukes (...!vax135!ukc!root44!pdl).