Weird behavior in logrotate
From: Scott Simpson (ssimpson_at_visionsolutions.com)
Date: 07/31/04
- Next message: Larry I Smith: "Re: Weird behavior in logrotate"
- Previous message: sean larsson: "Re: do_brk() error return"
- Next in thread: Larry I Smith: "Re: Weird behavior in logrotate"
- Reply: Larry I Smith: "Re: Weird behavior in logrotate"
- Reply: phil-news-nospam_at_ipal.net: "Re: Weird behavior in logrotate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Jul 2004 17:11:30 -0700
We are running logrotate with the "copytruncate" option. This option
truncates the file in place without changing the inode and copies the
contents to a backup file. Also, we have a Java program that is writing to
the file at the same time (with its file pointer at the 300K mark say). When
the truncate occurs, the file length shows as zero, but when the Java
program writes to the file after the truncate, I get 300K of nulls and then
the log file text from the Java program.
As I recall, other Unixes actually truncated the file and processes with
open file pointers would start back at the end of the file. Am I correct?
How would I get around this in Linux? I can't access the file pointer in the
Java process from logrotate.
- Next message: Larry I Smith: "Re: Weird behavior in logrotate"
- Previous message: sean larsson: "Re: do_brk() error return"
- Next in thread: Larry I Smith: "Re: Weird behavior in logrotate"
- Reply: Larry I Smith: "Re: Weird behavior in logrotate"
- Reply: phil-news-nospam_at_ipal.net: "Re: Weird behavior in logrotate"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]