From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-07-21 01:31:10
Miro Jurisic wrote:
> In article <cdj26s$et$1_at_[hidden]>, Vladimir Prus <ghost_at_[hidden]>
> > Actually, I'm not sure what it means to atomically create a directory.
> It means that if one processes is attempting directory creation and other
> processes are performing other filesystem operations (including directory
> creation, but not limited to it), then directory creation in the first
> process is guaranteed to completely succeed (creating a directory with the
> desired path and permissions and returning 0) or completely fail (returning
> an error and not touching the file system). This is not the case on all
> file systems and on those on which it is, the POSIX API does not guarantee
> that mkdir() is implemented to take advantage of it.
I'm still at loss. Could you give some specific situations between "completely
succeed" and "completely fail". Also, how does it affect temporary files? The
only case which seems to be problematic is when 'mkdir' returns success but
does not set the right permissions. Is it ever possible? My reading of the
docs suggests otherwise.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk