On Mon, Nov 15, 2004 at 02:36:57PM -0600, Filip Hanik - Dev wrote:
> nope, the moment you execute the mv the file handle has moved. switch to 
> cronolog to save you some time,
> cronolog might recreate the file for you to, so no handle is ever lost, try 
> it before you come back to the list :)
> 
[...snip...]
> if you dont get webmin fixed, I recommend cronolog instead.
> You cant just rotate it, cause then tomcat loses the file handle, and you
> will lose all further output.

        This is incorrect.  A reference to an open file stays perfectly valid
regardless of what is done to the name of the file.  You can even remove
the file entirely and any previously opened file handle will continue to
function (and take up disk space!).

        Renaming a file changes the way you get access to the underlying
file object but does not change the object itself.  Since a file handle
that a process has refers to the the underlying object, not the name,
output will continue to be written to the original file and the new
catalina.out will remain empty.

eric

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to