Re: Sometimes multilog rotates the logfile when receiving a sigterm
Daryl Tester <[email protected]> Fri, 28 Aug 2009 23:52:09 +0930
| Newsgroups | gmane.comp.djb.syslog |
|---|---|
| Message-ID | <[email protected]> |
(* Reply to /dev/null'd *) Rodrigo Campos wrote: > Also, I'm seeing that the logs are rotated without getting to the size > specified, and an ALRM signal is never sent to it. Are the logs rotated to *.s files with 744 permissions, or *.u files with 644 permissions? What are the permissions on ./test/current when multilog has "terminated"? > 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). Depending on your shell, ^C goes to the process group, so multilog will receive a SIGINT which I don't believe it traps (and therefore would terminate abnormally). I don't know about your "kill", except that if multilog terminated abnormally previously (denoted by the permissions on current) it will rotate current to a *.u filename when multilog runs the next time. > Does anyone know how to avoid this or if it is possible to avoid it ? multilog isn't traditionally run from the command line. If you honestly have a requirement to do this, run something that will run a setpgrp() prior to running multilog so that it shouldn't receive signals sent to the process group and should therefore terminate normally when the pipe closes. -- Regards, Daryl Tester "Crush! Kill! Deploy!" -- Lost In Space I.T. Dept.