in reply to How to detect if file is in use?

In a perfect world the program writing the log file would get a write lock and you could check if the file is locked.

A picture is worth a thousand words, but takes 200K.

Replies are listed 'Best First'.
Re^2: How to detect if file is in use?
by blazar (Canon) on Mar 18, 2005 at 07:47 UTC
    In fact that is another option we've been taking into account. It depends on our ability to access the src code of the given program, which we actually have but which is not an actual option ATM for various reasons far too long (and probably irrelevant) to be explained here now.

    However there's an issue with some instances of the log writing program dying unexpectedly (that's not strictly true, but it's the best approximation I can give without having to go into full irrelevant details) which is precisely one of the things we're coping with. So after all this wouldn't be a viable option in our case.