in reply to Random script crashes related to File::Copy
roboticus, no, the "Invalid cross-device link" error is caught by File::Copy::move() and causes it to try to copy the file and then unlink.
runrig, no, "trying to delete the file while it is still being written to" is not in evidence in the traces provided. The trace shows the destination being unlinked (despite it never having been created) after the source could not be opened.
As the original poster correctly noted, the problem is:
open("/mnt/xfer/31650_WRETCHED Radio 04-25_DIST.wav", O_RDONLY|O_L +ARGEFILE) = -1 ETXTBSY (Text file busy
So the addition of $! will likely add "Text file busy" to the output.
I've only ever seen that error when trying to delete an executable image when it was in use. On a good Unix platform, "man 2 open" will actually note more details about what "Text file busy" really means in the case of open() failing.
Indeed, open(2) says:
- ETXTBSY
- The file is a pure procedure (shared text) file that is being executed and the open() system call requests write access.
which doesn't match the name *.wav nor O_RDONLY so the original poster might want to check "man 2 open" on his particular operating system (and hope that it has "good" man pages in this respect).
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Random script crashes related to File::Copy (care)
by michael.barnes (Novice) on Apr 29, 2009 at 16:50 UTC | |
by tye (Sage) on Apr 29, 2009 at 16:58 UTC | |
by ikegami (Patriarch) on Apr 29, 2009 at 17:01 UTC | |
by tye (Sage) on Apr 29, 2009 at 23:59 UTC | |
by ikegami (Patriarch) on May 07, 2009 at 16:32 UTC |