in reply to Re^5: locking over the network (rename)
in thread locking over the network
I'm sure that SMB/CIFS supports atomic renameI'm quite optimistic that it does, but the question is whether this is used "automatically" by Perl or not. My guess is that Perl just calls the 'rename' function of the C library, when it was compiled. I don't know how to verify this because I am using the ActiveState distribution of Perl 5.8.8, and don't know where to get the sources (ActiveState doesn't seem to have them anymore). But even if I have this information, I would need to know which version of which C compiler was used to create this distribution, and whether the rename in the compiler's library works in the expected way.
That's why I hoped that the Perl documentation would give some "guarantees" about this issue, but even perlport doesn't say anything about atomicity. You mention that NFS does not support atomic rename. I didn't know this before - thank you for telling me -, and since access to the filesystem via NFS is one possibility for our case, I think I should better drop the idea of replacing my original solution (using flock) by the more elegant 'rename' solution. :-(
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: locking over the network (rename)
by Corion (Patriarch) on Feb 01, 2011 at 16:06 UTC | |
by rovf (Priest) on Feb 01, 2011 at 16:16 UTC | |
by Corion (Patriarch) on Feb 01, 2011 at 16:38 UTC | |
by rovf (Priest) on Feb 02, 2011 at 10:06 UTC | |
by Corion (Patriarch) on Feb 02, 2011 at 11:23 UTC | |
| |
|
Re^7: locking over the network (guarantee)
by tye (Sage) on Feb 01, 2011 at 18:56 UTC | |
by rovf (Priest) on Feb 02, 2011 at 10:22 UTC | |
by tye (Sage) on Feb 02, 2011 at 14:25 UTC | |
by rovf (Priest) on Feb 02, 2011 at 14:58 UTC |