Re: mkdir() and thread safety()
- From: David Schwartz <davids@xxxxxxxxxxxxx>
- Date: Wed, 30 Mar 2011 14:53:25 -0700 (PDT)
On Mar 28, 5:59 am, Rainer Weikusat <rweiku...@xxxxxxxxxxx> wrote:
Also, the UNIX(*) standard demands that mkdir is supposed to fail with
EEXIST when the named file already existed. This is not possible when
mkdir is not an atomic operation.
Yes, it is. The algorithm I specified will always fail if the named
file already existed before the operation started. There is no
requirement for atomicity. You can't just make up requirements because
they seem reasonable to you.