How to flush output to disk?
Dan Mick
dan at charyb.COM
Sun Dec 10 08:19:16 AEST 1989
In article <1989Dec8.131507.1685 at virtech.uucp> cpcahil at virtech.uucp (Conor P. Cahill) writes:
|In article <333 at charyb.COM>, dan at charyb.COM (Dan Mick) writes:
|> fflush()? You've gotta do that more than once. Why not add a
|> setbuf(stdout, NULL) to the top of the file? Quick, easy, simple.
|
|except that it is much more ineffecient unless you plan to call fflush() after
|*every* putc()/fprintf()/fputs().
Hey, you're debugging, right? Efficiency has to be near the bottom of the
priority list anyway. My point is it's one mod to main(), and it makes sure
you don't miss something in the call tree that you're not (at the moment)
tracing down. Or, okay, if efficiency is *that* annoying, how about
setlinebuf(), as someone mentioned?
--
.sig files are idiotic and wasteful.
More information about the Comp.unix.questions
mailing list