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

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.

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

Replies are listed 'Best First'.