in reply to Re: Safely create new directory (mkdir, NFS) in thread Safely create new directory
Thanks, that helps!
About your point that there's no atomic "delete the file and create the dir" operation. I understand that, but my point was to just leave the file there. Sure it's a dirty solution, that's why I was looking for better solution. Just using "mkdir" sounds good, if it's atomic then that will do the trick. I saw similar issues with O_EXCL not being guaranteed on older Linux kernels, but it was mentioned that it should be safe from 2.6.5 onwards.
|