Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!charyb!dan From: dan@charyb.COM (Dan Mick) Newsgroups: comp.unix.questions Subject: Re: How to flush output to disk? Message-ID: <338@charyb.COM> Date: 9 Dec 89 21:19:16 GMT References: <606@caldwr.UUCP> <1025@friar-taac.UUCP> <4176@sbcs.sunysb.edu> <333@charyb.COM> <1989Dec8.131507.1685@virtech.uucp> Reply-To: dan@charyb.UUCP (Dan Mick) Distribution: usa Organization: KFW Corporation, Newbury Park, CA Lines: 17 In article <1989Dec8.131507.1685@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes: |In article <333@charyb.COM>, dan@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.