This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ijmorlan
Recipients draghuram, gvanrossum, ijmorlan
Date 2007-12-21.18:19:55
SpamBayes Score 0.03101625
Marked as misclassified No
Message-id <1198261197.23.0.470310830019.issue1675@psf.upfronthosting.co.za>
In-reply-to
Content
Attached is an svn diff against the trunk.  I was looking at os.py from
Python 2.5 not the trunk, and it appears that an attempt at fixing the
race condition has already been put into os.py, but I don't believe it's
correct.

The attached patch renames the existing mkdir to _mkdir, and creates a
new mkdir with an additional "excl" parameter to select
error-if-already-exists or not.  It defaults to the current behaviour. 
Similarly, makedirs gets the same extra parameter which is passed down
to mkdir.

By simply using the new versions as before, one obtains the old
behaviour unchanged except that the race condition is corrected.  By
using excl=False one gets the new behaviour.

I have updated the documentation also but I don't really know what I'm
doing there so my use of the rst format may not be right.
Files
File name Uploaded
patch.txt ijmorlan, 2007-12-21.18:19:55
History
Date User Action Args
2007-12-21 18:19:57ijmorlansetspambayes_score: 0.0310162 -> 0.03101625
recipients: + ijmorlan, gvanrossum, draghuram
2007-12-21 18:19:57ijmorlansetspambayes_score: 0.0310162 -> 0.0310162
messageid: <1198261197.23.0.470310830019.issue1675@psf.upfronthosting.co.za>
2007-12-21 18:19:57ijmorlanlinkissue1675 messages
2007-12-21 18:19:56ijmorlancreate