syslog log rotation
davidsen at tmr.com
Wed Apr 25 20:30:31 UTC 2001
In article <72bspl4dla.fsf at nd1.eng.demon.net>,
Alex Kiernan <alexk at demon.net> wrote:
| Don't we have a different race in the existing code - I think you can
| lose log messages in between the cp & the cat /dev/null.
| Thinking how Solaris does cp, it determines the length of the file,
| mmaps() chunks & writes them - for a running INN that looks like a
| mass of writes in that window.
| Or am I missing something obvious?
No, you can/do lose a message with the existing setup. I changed the
"cat /dev/null >log" to ": >log" which moves it up one process, but it
still can lose a message.
I did do a hack for this, creating a program which is setuid, group
executable, group root, which will send a kill hup to a process named
on the command line. My version is Linux-centric, the process must be
registered in /var/run, or you can enter a PID by hand. In most cases
I don't care enough to install it.
bill davidsen <davidsen at tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
More information about the inn-workers