Subject: Re: log files and rotation
To: VaX#n8 <vax@linkdead.paranoia.com>
From: Curt Sampson <curt@portal.ca>
List: current-users
Date: 06/26/1996 13:12:46
> You'd think the window in which newsyslog had deleted a logfile but not
> created a new one would be small... today I got
> "syslogd: /var/log/maillog: No such file or directory".
Newsyslog doesn't create the new logfile. What's supposed to happen
is that newsyslog moves it. After the move, syslogd is now writing
to the destination file, because it still has that file descriptor
open. Newsyslog sends a sighup to syslogd, which closes and reopens
the file, thus recreating the original.
>From a quick glance at the code, it looks as if the above message
would be generated if it tried to write to the file (using an
already open file descriptor) and the write failed. This wouldn't
be caused by renaming or deleting the file.
BTW, it would be nice to have a a newsyslogd that allows one to
specify a file holding a pid to send the signal to, rather than
just sending it to the syslogd process. Is anybody working on such
a thing? It's been on my to-do list for about eight months now. :-)
cjs
Curt Sampson curt@portal.ca Info at http://www.portal.ca/
Internet Portal Services, Inc.
Vancouver, BC (604) 257-9400 De gustibus, aut bene aut nihil.