Date: Wed, 2 Jul 2003 12:08:31 +0300 From: Jim Xochellis <dxoch@escape.gr> To: freebsd-questions@FreeBSD.ORG Subject: About newsyslog behavior Message-ID: <C02C7B00-AC6C-11D7-A8D3-003065C4E486@escape.gr>
next in thread | raw e-mail | index | archive | help
Hi list, I am using the newsyslog utility to turn over my log files automatically. I have noticed that some processes have problem to continue using their log file after newsyslog has turned it over and need to receive the SINGHUP signal to re-start logging correctly. However sending SINGHUP has uncomfortable consequences in some cases (for instance when sending signal to netatalk, or other file servers perhaps). I suspected that some processes are confused because a *new* log file is created and these processes are making the assumption that their log file will be always the same and perhaps they open it once and then work with the FILE pointer. (just a simple theory that explains some facts) I have confirmed that newsyslog actually creates a new log file (instead of copying it and then disposing its contents) by reading the source of the newsyslog.c file and particularly the dotrim() function. I have also tested that changing the contents of the log files by hand does not affect the logging of most processes (surely not the logging of netatalk). Having the above in mind, isn't it worthwhile to add an option in newsyslog in order to avoid the creation of a new log file when it is inconvenient? Isn't it feasible to dispose the contents of the old log file instead of creating a new one? Anything that I am missing here? (giving the fact that I am not a unix guru, only a C programmer) Thank you very much for your time Jim Xochellis
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C02C7B00-AC6C-11D7-A8D3-003065C4E486>