Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/3/84; site genrad.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!john From: john@genrad.UUCP (John Nelson) Newsgroups: net.lang.c Subject: Re: i/o redirection Message-ID: <764@genrad.UUCP> Date: Wed, 17-Apr-85 16:32:50 EST Article-I.D.: genrad.764 Posted: Wed Apr 17 16:32:50 1985 Date-Received: Thu, 18-Apr-85 23:44:05 EST References: <215@ttidca.UUCP> Reply-To: john@genrad.UUCP (John Nelson) Organization: GenRad, Bolton MA Lines: 11 In article <215@ttidca.UUCP> davidt@ttidca.UUCP (David Terlinden) writes: >gsc asks about buffering of stdout of execed processes. I say that it's not >the fault of the OS but of the stdio library. 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[]"? SURE! Why not write a program to poke around in the executable file, and reset that flag in _iob[1]. This solves the problem of having only a binary. Unfortunately, this won't work if the executable has been "stripped".