Sometimes multilog rotates the logfile when receiving a sigterm

Rodrigo Campos <[email protected]> Thu, 27 Aug 2009 21:49:00 -0300
Newsgroups gmane.comp.djb.syslog
Message-ID <[email protected]>
I'm using multilog (running <program> | multilog...) with a program
that sometimes segfaults or that someone does a kill <program pid>.

Also, I'm seeing that the logs are rotated without getting to the size
specified, and an ALRM signal is never sent to it.

I've made a simple test case to see this and when I kill it, it
sometimes rotates the log. I've made a simple asd.sh script: cat
asd.sh

echo "una frase"
echo $$
sleep 25


And I run "sh asd.sh | multilog s1048576 ./test/".

If I kill it using ctrl+c or just "kill <pid>" it sometimes rotates
the file (besides its way low the size it should be).


Does anyone know how to avoid this or if it is possible to avoid it ?
Perhaps this is on purpose ?





Thanks a lot,
Rodrigo