Date: Sat, 3 Apr 2004 21:45:26 +0930 From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: freebsd-hackers@freebsd.org Subject: Re: Loosing STDOUT after file rotation Message-ID: <200404032145.26767.doconnor@gsoft.com.au> In-Reply-To: <406C8F4F.1040306@Thehousleys.net> References: <406C8F4F.1040306@Thehousleys.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2 Apr 2004 07:23, 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. As other people have pointed out, you need another program or to write the log file in the program itself. I have the "another program" bit, it doesn't listen for signals but reopens the file for each blob of data. It's actually work's but I can get my boss to relicense it if you want it. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 9A8C 569F 685A D928 5140 AE4B 319B 41F4 5D17 FDD5
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404032145.26767.doconnor>