Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks, I have multiple processes running and these processes are inturn generating log files. My problem is to check when the log file is completed ie., it is not used by any process. Is there a method in file IO to check if a file is opened by any other process? Regards, Sid

Replies are listed 'Best First'.
Re: File IO problem
by ikegami (Patriarch) on Feb 07, 2006 at 06:02 UTC
    If all processes use flock when reading or writting to the log file, you can use flock to check if anyone is using it.
Re: File IO problem
by Plankton (Vicar) on Feb 07, 2006 at 03:50 UTC