Re: Sometimes multilog rotates the logfile when receiving a sigterm
Rodrigo Campos <[email protected]> Sat, 29 Aug 2009 02:25:26 -0300
| Newsgroups | gmane.comp.djb.syslog |
|---|---|
| Message-ID | <[email protected]> |
2009/8/28 Daryl Tester <[email protected]>: > (* Reply to /dev/null'd *) > > Rodrigo Campos wrote: > >>> Are the logs rotated to *.s files with 744 permissions, or *.u files with >>> 644 permissions? > >> .u files with 644 > > This indicates that multilog had been abnormally terminated. Yeap >> >> I see the file rotated without running it a next time. > > Rotate to *.s, or *.u. There is a race here - if the first program > terminates quickly enough and closes the pipe, multilog may get > the chance to clean up before receiving the signal. hmm, could be. Anyways, I've tried sending a SIGPIPE to multilog (what multilog should receive if the process die, if I'm not wrong) and it happens that the file is rotated with .u extension (and without running it an other time). I've thought that perhaps it should handle SIGPIPE as a SIGTERM, I made a patch at work, but... it was friday, I didn't test it and... go home :). What do you think about handling SIGPIPE as a SIGTERM ? Thanks a lot, Rodrigo