Bind and Newsyslog under FreeBSD

Scott Bertilson scott at nts.umn.edu
Mon Dec 15 20:05:27 UTC 2003


> In article <bra1a4$16sf$1 at sf1.isc.org> Walt Howard,
> You can reduce the problem by using a log-rollover program that is able
> to copy the existing logfile and then truncate it.  That way the named
> program can continue to use the same file descriptor, which it wants to

  I've seen this suggestion a few times and have always felt
like I must be missing something.  My understanding of
Unix/Linux file semantics would say that "named" would retain
the file offset to which it was writing so that this would
cause a "sparse" file to be created which would return NUL
bytes from the beginning of the file up to the file offset
after which you'd actually get the new log contents.  Does
"named" take special precautions to note that the file shrank
and reset the file offset so that this works as you would
hope?  I would think this would be undesirable since it
would not be possible for the copy/truncate to be done
atomically.
					Scott


More information about the bind-users mailing list