
"Thijs Koerselman"
Hi,
This might not be a Boost question. I'm not sure.
I have 2 independent applications. One is writing information to a log file somewhere, the other contains a console window. What I would like to do is poll the log file from the application with the console window, and write any new lines (since last poll) to the window.
The general technique is to read to the end of the file, then periodically check the file's size to see if it's grown; if so, keep reading (possibly doing an explicit seek to the point you were at when you last saw EOF, to reset any internal flags) until you get EOF again. This is basically what the Unix command "tail -f" does. If you're on Unix you may want to use it; if you're not you may want to look at the source for ideas. Good luck! ----Scott.