There is no truly "atomic" operation on the file system
From the Open Group Specification of rename:
That specification requires that the action of the function be atomicThat is, the rename(1) system call is required to be atomic on all Unix systems. As tye points out, rename is also atomic on Windows.
In practice, on Unix and Windows, so long as both files reside on the same OS file system, you should be able to rely on the Perl rename function being atomic.
In reply to Re^2: Read in hostfile, modify, output
by eyepopslikeamosquito
in thread Read in hostfile, modify, output
by razmeth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |