From owner-freebsd-arch Tue Feb 25 16:18:15 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3386137B401 for ; Tue, 25 Feb 2003 16:18:14 -0800 (PST) Received: from smtp1.server.rpi.edu (smtp1.server.rpi.edu [128.113.2.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3604B43FA3 for ; Tue, 25 Feb 2003 16:18:13 -0800 (PST) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp1.server.rpi.edu (8.12.7/8.12.7) with ESMTP id h1Q0I93q031964; Tue, 25 Feb 2003 19:18:09 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <200302251255.48219.wes@softweyr.com> References: <20030210114930.GB90800@melusine.cuivre.fr.eu.org> <200302251255.48219.wes@softweyr.com> Date: Tue, 25 Feb 2003 19:18:08 -0500 To: Wes Peters , arch@FreeBSD.ORG From: Garance A Drosihn Subject: Re: NEWSYSLOG changes Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-RPI-Spam-Score: -1.6 () IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SIGNATURE_SHORT_DENSE,SPAM_PHRASE_00_01 X-Scanned-By: MIMEDefang 2.28 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 12:55 PM -0800 2/25/03, Wes Peters wrote: >On Monday 24 February 2003 18:08, Garance A Drosihn wrote: > > The idea of -R is that newsyslog should always rotate the given > > list of files, whether or not *it* thinks they need to be rotated. > > For now it is assumed that the caller is the same process which >> usually writes to the file, and thus it does NOT use the pid_file >> to signal that process. The whole idea of this is to let Wes >> change syslogd to use this, and it would be silly for newsyslog >> to HUP syslogd when it's syslogd that is requesting the rotate. >> It may be that we should handle the pid-file signalling a >> different way. > >Uh, actually, syslogd needs the HUP to re-open the file. ;^) > >I can change that iff I run newsyslog -F, waiting for the "new" >log file to appear. Let me think about how to best do that... Well, I'm seriously thinking of redoing the -R update a little, and have a separate option to say "do not signal". So, -R will still send the signal by default. Still, I'd think that syslogd would: close the logfile exec newsyslog -NR syslogd somefile wait for that to finish re-open the log file. If newsyslog does the HUP, then it is also going to sleep for something like 5 seconds, because it wants to be sure that the signaled-process has done all the processing it needs to do. >... I do like the idea of not needing a HUP signal between the >two since syslogd started the newsyslog anyhow. Also, wouldn't a HUP will cause all config-files to be re-read, and all log files to be closed and opened? That seems like a lot of unnecessary work. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message