What happens if there are 2 concurrent requests to create a directory in file system (what are the differences concerning this problem between knonw FSs?)? Will one request success and another fail with an error or will another request overwrite the first folder (I think by default it would be stupid. Only if I set the option for this)? Are this operations atomic?
migrated from stackoverflow.com Mar 7 '13 at 9:03
This question came from our site for professional and enthusiast programmers.
One will succeed and one will fail. This is as per the manpage:
Creating a directory is necessarily atomic because any other process which is examining the system at the same time will either find that the new directory exists, or that it does not. There is no such thing as a partially created directory.
You cannot set an option to make