Last week there was much discussion (some of it even on topic :) about
making multilog rotate files on receipt of a signal.

Here's my very simple patch to make multilog rotate its current file
on receipt of SIGHUP. I have tested it under RedHat Linux 6.2 ONLY.
However, as I have used Dan's coding style (all 2 lines of it) it
should work under any systems on which multilog currently works.

My tests were fairly minimal - I hammered multilog as fast as I could
and sent it a SIGHUP. I then checked to see if it lost any data
between rotations - it didn't.

It obviously needs field testing, but I think it will allow us to
rotate based on time. All we need is a cron job to send the SIGHUP at
the appropriate time.

If you use this, please let me know how it goes. If I get positive
feedback (or no feedback at all) I'll release it in the same manner as
my tai64nunix package - ie a stripped down daemontools with only enough
to build the new multilog. This should comply with Dan's licensing
rules.

-- 
Regards
Peter
----------
Peter Samuel                            [EMAIL PROTECTED]
http://www.e-smith.org (development)    http://www.e-smith.com (corporate)
Phone: +1 613 368 4398                  Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada

"If you kill all your unhappy customers, you'll only have happy ones left"

Emanuel.exe

Reply via email to