in reply to Re: can you autoflush a program in unix?
in thread can you autoflush a program in unix?

you're out of luck

Well not entirely, you're back to writing debuggers

  • Comment on Re^2: can you autoflush a program in unix?

Replies are listed 'Best First'.
Re^3: can you autoflush a program in unix?
by ikegami (Patriarch) on Oct 20, 2009 at 20:21 UTC
    I don't understand. Why would one write a debugger rather than using an existing one, and what does that have to do with the topic at hand?
      Heh. I think he means use the Unix debugging API to, e.g. sniff for calls to fprintf() et al, and insert a fflush() call when that happens. Or something like that.

      Come to think of it, you could probably do what OP wants by writing an LD_PRELOAD library that overrides a large chunk of stdio... the caveats being that this is dark magic, ugly, will fail if the offending program is using its own buffered-output routines, and could conceivably make said program break in interesting ways.