From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 2 08:54:51 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D85A16A4CE for ; Fri, 2 Apr 2004 08:54:51 -0800 (PST) Received: from smtp.dkm.cz (smtp.dkm.cz [62.24.64.34]) by mx1.FreeBSD.org (Postfix) with SMTP id 3552843D1D for ; Fri, 2 Apr 2004 08:54:50 -0800 (PST) (envelope-from neuhauser@chello.cz) Received: (qmail 13065 invoked by uid 0); 2 Apr 2004 16:54:48 -0000 Received: from r3al16.mistral.cz (HELO isis.wad.cz) (213.220.229.16) by smtp.dkm.cz with SMTP; 2 Apr 2004 16:54:48 -0000 Received: by isis.wad.cz (Postfix, from userid 1001) id A19EE2FDA01; Fri, 2 Apr 2004 17:55:46 +0200 (CEST) Date: Fri, 2 Apr 2004 17:55:46 +0200 From: Roman Neuhauser To: James Housley Message-ID: <20040402155546.GB14408@isis.wad.cz> Mail-Followup-To: James Housley , freebsd-hackers@freebsd.org References: <406C8F4F.1040306@Thehousleys.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <406C8F4F.1040306@Thehousleys.net> User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org Subject: Re: Loosing STDOUT after file rotation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2004 16:54:51 -0000 # jim@thehousleys.net / 2004-04-01 16:53:19 -0500: > I have a program that I have the is supposed to run forever. I log any > output to a log file. It is run in a startup script like thie: > > program_name >> $err_log 2>&1 > > The problem is that after newsyslog rotates the $err_log file, no more > data is written to the file. I can not stop and restart the program. I > can accept a signal. But what do I need to do in "program_name" to allow > the data to be written after the "rotation" of the file. the program still writes to the original file. file != filename. you need to have newsyslog send the daemon a signal; the program needs to reopen the path in the signal handler. -- If you cc me or remove the list(s) completely I'll most likely ignore your message. see http://www.eyrie.org./~eagle/faqs/questions.html