in reply to Re: Random script crashes related to File::Copy
in thread Random script crashes related to File::Copy

Since I am using the move() function from the File::Copy module, I have been relying on the correctness of the module to check the various things mentioned.

In comparing the two strace excerpts, it appears to me that the error is occurring before the move process actually begins. In the strace segment that does work, I see that if the open attempt is successful, then the read/write sequences begin.

I am still quite new to this level of script work. But if I am understanding the strace output correctly, this error is occurring before anything actually touches the file itself. It seems that something is opening the file and not getting it closed in time for the next open attempt. I just don't know what.

May this involve delving into the File::Copy module and possible needing some kind of change or delay there? I have looked at the module, but the majority of it is way over my head.


Thanks,
Michael
  • Comment on Re^2: Random script crashes related to File::Copy

Replies are listed 'Best First'.
Re^3: Random script crashes related to File::Copy (problem)
by tye (Sage) on Apr 30, 2009 at 04:59 UTC
    I have been relying on the correctness of the module to check the various things mentioned.

    Um, File::Copy::move()'s documentation says nothing about "Waits for the source file to be finished being created and then...".

    Trying to get the monitor/copier process to correctly determine whether the to-be-moved file is finished being written is likely a hard problem, perhaps an impossible problem (depending).

    That is why I outlined the "usual" way to have whatever is dumping these files into the source directory to do it in a way that makes it clear when the file being dumped there has been completely dumped (and is thus ready to be moved by the monitor/copier).

    - tye