[Linux-disciples] Signal-free log rotation

Stephen R Laniel steve at laniels.org
Tue Feb 7 17:50:23 EST 2006


I'm a little confused by this:
http://public.yahoo.com/~radwin/talks/yapache-apachecon2005.htm

Specifically the slide titled 'Signal-free Log Rotation'.
I'd like to do log rotation somewhat like this, but I'm not
sure that I understand how they're doing the rotation. The
way I'd do it is something like

1) mv logfile logfile.old

   Here Apache is still writing to logfile.old, I believe.

2) kill -HUP apache or somesuch, to get it to reload its
   files.

   Now Apache will stop writing to logfile.old and start
   writing again to logfile. Though maybe there will be some
   old child processes still writing to the old one. In any
   case, eventually they will all be writing to the new
   logfile.

Yet somehow they do this without signals and without
restarting Apache. Can someone explain what I'm missing
here?

-- 
Stephen R. Laniel
steve at laniels.org
+(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20060207/38d8a96d/attachment.pgp


More information about the Linux-disciples mailing list