i/o redirection

Arthur David Olson ado at elsie.UUCP
Sun Apr 21 03:48:15 AEST 1985


In article <215 at ttidca.UUCP> davidt at ttidca.UUCP (David Terlinden) writes:
>gsc asks about buffering of stdout of execed processes. . .
>If the flag field in _iob[1] says to buffer output (the default value),
>the first output function to stdout will notice this and allocate a buffer.
>Since _iob is initialized data of the new process, anything you do before the
>exec has no effect.  Can anyone suggest anything other than modifying
>"putchar()" or "_iob[]"?

Here's my wish list solution:  before deciding to buffer output,
standard input/output library functions would check to see if "DONTBUFFER"
(or maybe "BUFFERING=NONE") was present in the environment.  If such a beast
was present, no buferring would be done.

This approach would allow the parent process to control buffering in a way
that was transparent to the child process.
--
	UUCP: ..decvax!seismo!elsie!ado    ARPA: elsie!ado at seismo.ARPA
	DEC, VAX and Elsie are Digital Equipment and Borden trademarks



More information about the Comp.lang.c mailing list