httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Poirier <poir...@pobox.com>
Subject Questions before I add .n feature to rotatelogs
Date Mon, 01 Nov 2010 15:13:02 GMT
I'm working on a keep-N-files feature for rotatelogs (rename logfile to
logfile.1, logfile.1 to logfile.2, etc up to N) but have a couple of
concerns before I commit it.

1) Is it safe to rename an open file on all platforms? I know Unix is
okay, and testing on Windows 2003 worked, but I'm not sure about older
Windows, NetWare, etc.

2) All the current schemes have the nice property that rotatelogs can
try to open the new logfile before closing the old one, so if the open
fails, it can truncate and re-use the still-open old logfile.  If I
can't rename the old file before closing it, I'll have to close it and
rename it before opening the new one, since the new one will have the
same name.  Is that much of a concern?

Thanks,
Dan

Mime
View raw message