It should be "O_EXCL isn't 100% reliable on NFS if two different systems are manipulating the same file at virtually the same time". If your program is only running on one system, or if the file has already existed for a couple minutes, then O_EXCL _is_ 100% reliable.
So, according to your definition, coitus interuptus is a 100% reliable method of birth control as long as you avoid some edge cases, like a man having sex with a woman.
Regarding pregnancy, there are exactly two states: Pregnant or not. You can't be 42% pregnant. And like with pregnancy, O_EXCL on NFS (or any other networked filesystem) is either reliable and prevents access to a file by more than one process on one machine every time and under all conditions, or it is unreliable.
For Linux, the man page for open explains the situation quite well:
So, for Linux, O_EXCL is unreliable if you are running a kernel before 2.6 or use it on a non-v3 NFS. That does not mean that it is reliable with 2.6+ and NFSv3. The FreeBSD people seem to have had similar problems, especially if you mix in Solaris.
Alexander
In reply to Re^2: How to move/copy a file without overwriting an existing file
by afoken
in thread How to move/copy a file without overwriting an existing file
by bart
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |