Tony Stock wrote:
>
> Thanks for the responses - food for thought.
>
> It will be on a unix platform (unknown at present though)
>
> Just a little confused, one poster said that it needs to be UNBUFFERED
> io (i.e. open / read / close), but the sample code posted uses a
> normal fileopen (fopen) ????
This is OT on c.l.c. but FYI here is an extract from the info file
for GNU tail:
> `-f'
> `--follow[=HOW]'
> Loop forever trying to read more characters at the end of the file,
> presumably because the file is growing. This option is ignored
> when reading from a pipe. If more than one file is given, `tail'
> prints a header whenever it gets output from a different file, to
> indicate which file that output is from.
>
> There are two ways to specify how you'd like to track files with
> this option, but that difference is noticeable only when a
> followed file is removed or renamed. If you'd like to continue to
> track the end of a growing file even after it has been unlinked,
> use `--follow=descriptor'. This is the default behavior, but it
> is not useful if you're tracking a log file that may be rotated
> (removed or renamed, then reopened). In that case, use
> `--follow=name' to track the named file by reopening it
> periodically to see if it has been removed and recreated by some
> other program.
--
Chuck F () ()
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
|