This one still has a race condition between the test for existance and the creation of the new file.
Which is why typically you never perform that test -- its redundant and introduces a race condition
In reply to Re: Atomic update counter in a file
by Anonymous Monk
in thread Atomic update counter in a file
by pbijnens
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |