|
|
|
|
|
by fsckboy
1047 days ago
|
|
the type of atomicity I've always seen it used for is, two processes try to rename a file at the same time, only one will succeed; the winner does what they planned and then rename the file back. I guess you shouldn't ignore the error with both processes using the same destination name, why folks generally tend to put their pid in the lockfilename |
|
If you want atomic creation of a path, where no one else can succeed also, you want link(2) not rename(2).