tags 286957 confirmed patch
thanks
On Sat, Sep 03, 2005 at 01:41:07AM -0400, Tom Metro wrote:

>    gzip preserves the mode, ownership and timestamps of files when
>    compressing or decompressing.
> 
> That would suggest logrotate is doing something more than just renaming 
> and compressing the old logs.

No, it's compressing them in stdin/stdout mode, rather than providing 
gzip with the file name on the "command line". It's equivalent to:

  cat logfile | gzip >logfile.gz

It's certainly possible to add the following code to the function 
compressLogFile():

 struct utimbuf utim;

 utim.actime = sb->st_atime;
 utim.modtime = sb->st_mtime;
 utime(compressedName, &utim);

...just before the call to unlink(name).

-- 
Paul Martin <[EMAIL PROTECTED]>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to