tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: stdio buffering extension



On Jul 16,  7:03pm, david%l8s.co.uk@localhost (David Laight) wrote:
-- Subject: Re: stdio buffering extension

| The one I want most is line buffering to pipes.
| You almost want to force it from the reading end (eg in tee).
| The other common case is when stdout and stderr refer to the
| same file - when you probably want line buffering for stdout.

Yes, but specifying via environment variables is saner than making
a bunch of complicated rules. 

| OTOH if a program is writing binary data (maybe using fwrite()
| not fprintf()) then block buffering is more likely to be
| appropriate.

The standard does not differentiate, I think. Our code obeys the
current buffering flags.

| How much scope does the standard give for more intelligent
| choices?

Not much. I think that even the environment variables I added violate
the standard when set.

christos


Home | Main Index | Thread Index | Old Index