Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 29169 invoked from network); 15 Nov 2004 22:41:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Nov 2004 22:41:26 -0000 Received: (qmail 80009 invoked by uid 500); 15 Nov 2004 22:41:09 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 79987 invoked by uid 500); 15 Nov 2004 22:41:09 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 79974 invoked by uid 99); 15 Nov 2004 22:41:08 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [64.81.146.22] (HELO poe.swapsimple.com) (64.81.146.22) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 15 Nov 2004 14:41:06 -0800 Received: by poe.swapsimple.com (Postfix, from userid 101) id 263846C6B3B; Mon, 15 Nov 2004 16:41:02 -0600 (CST) Date: Mon, 15 Nov 2004 16:41:02 -0600 From: erh@swapsimple.com To: Filip Hanik - Dev Cc: Tomcat Users List Subject: Re: Rotating catalina.out with Webmin Message-ID: <20041115224102.GA15538@poe.swapsimple.com> References: <00f401c4cb5b$86923dd0$dd01dc0a@Corp.LaQuinta.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00f401c4cb5b$86923dd0$dd01dc0a@Corp.LaQuinta.com> User-Agent: Mutt/1.4.2.1i X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Mon, Nov 15, 2004 at 03:39:01PM -0600, Filip Hanik - Dev wrote: > this was not the case when using a java.io.FileOutputStream(), so I assume you tried and verified this :) You are confused. It _is_ the case with FileOutputStream. The only way it could be otherwise is if the output stream re-opens the file, either on every write, or when it notices that the file name no longer refers to the same file. Create aa.java with this code: import java.io.*; public class aa { public static void main(String[] args) throws Exception { FileOutputStream f = new FileOutputStream(args[0]); f.write(80); f.flush(); synchronized(f) { f.wait(5 * 1000); } f.write(81); f.flush(); } } And run this: java aa foo & mv foo bar Notice that the output of the second write (which occurs after the file is renamed) is in the original file (bar), not in a new foo. eric --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org