You are writing the file to one file system and then "renaming" it to a different file system? Why? That's rather silly. Renaming to a different file system requires that the contents be copied, which means races leading to partial content. If you need to do that, then I'd copy the file to the new file system under a temporary name (even if you use /bin/mv to do the copying) and then atomically rename from the temporary name (which the receiver should know to ignore) to the real name (which might involve two different directories on the final file system).
You haven't even bothered to read any Unix man pages for rename? Did you want an engraved invitation? They even answer your question about NFS.
Note that Perl's rename is atomic on Win32 including across Samba. No, I don't have links that say this ready to hand to you. You might have to do some research.
- tye
In reply to Re^5: locking over the network (rename)
by tye
in thread locking over the network
by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |