On 5/1/07, Scott Dial <[EMAIL PROTECTED]> wrote: > The cygwin implementation of rename goes like this: > > 1) Try to use MoveFile > 2) Try to use MoveFileEx(..., MOVEFILE_REPLACE_EXISTING) > 3) Try to unlink destination, then try to use MoveFile > > And as you say, Cygwin claims it meets POSIX.1. And, POSIX.1 says, "If > newpath already exists it will be atomically replaced (subject to > a few conditions; see ERRORS below), so that there is no point at which > another process attempting to access newpath will find it missing." > Clearly, unliking and then calling MoveFile is not atomic. So, cygwin is > not being honest here because in these less frequent cases, the rename > will not be atomic.
You are right. I just checked cygwin's rename() code and it is convincing enough for me to withdraw the patch. Thanks for all the comments. Raghu _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com