From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 2 05:53:14 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 9E49E16A4D0 for ; Fri, 2 Apr 2004 05:53:14 -0800 (PST) Received: from bast.unixathome.org (bast.unixathome.org [66.11.174.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D40343D54 for ; Fri, 2 Apr 2004 05:53:14 -0800 (PST) (envelope-from dan@langille.org) Received: from xeon (xeon.unixathome.org [192.168.0.18]) by bast.unixathome.org (Postfix) with ESMTP id 2C6773D31; Fri, 2 Apr 2004 08:53:13 -0500 (EST) Date: Fri, 2 Apr 2004 08:53:13 -0500 (EST) From: Dan Langille X-X-Sender: dan@xeon.unixathome.org To: James Housley In-Reply-To: <406C8F4F.1040306@Thehousleys.net> Message-ID: <20040402085244.L8697@xeon.unixathome.org> References: <406C8F4F.1040306@Thehousleys.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 13:53:14 -0000 On Thu, 1 Apr 2004, James Housley wrote: > 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. When the signal is received, close the file, and reopen it. -- Dan Langille - BSDCan: http://www.bsdcan.org/