[log in to unmask] wrote:
> I think there's an Unix mode to turn off buffering,
> something like
>
> setvbuf ( stdout, (char*)NULL, _IONBF, 1 );
Better yet use setlinebuff(stdout) or equivalent wrappers.
Someone may be able to advise me on this though. My problem is that I am
piping stdout from a Fortran program into a file and then stdout becomes
buffered. How do I avoid this without calling set*buff in the Fortran program
(assuming the Fortran library leaves stdout to the C library, so that this
works in the first place). I am thinking there must be a shell script way to
do this?
Thanks,
Aleks
|