stdio buffering (was: dup()'ed pipe()'s to stdio)
Doug Gwyn
gwyn at smoke.BRL.MIL
Sun Feb 4 10:00:19 AEST 1990
In article <22266 at mimsy.umd.edu> chris at mimsy.umd.edu (Chris Torek) writes:
>... I think it was a mistake to add line-buffering to stdio at all: ...
>... The right solution is to put fflush calls into the offending program.
Well, well, Chris and I found something else we agree upon.
To my mind this automatic-line-buffering-on-terminal-streams feature
is yet another example of some software designer (maybe even DMR in
the case of stdio) trying to make support functions more convenient
to use WITH RESPECT TO A "TYPICAL USAGE" MODEL. Unfortunately, as
usually happens in such cases, the "convenience" feature gets in the
way of unusual but interesting applications.
Just because an open file descriptor is associated with a device that
understands terminal control commands does not mean that there is an
interacting human being on the other end.
Just because an open file descriptor is associated with a device that
does NOT understand terminal control commands does not mean that there
is NOT an interacting human being on the other end.
The model that associates these aspects is too limited.
More information about the Comp.unix.questions
mailing list