[New-bugs-announce] [issue9281] Race condition in distutils.dir_util.mkpath()

Arfrever Frehtes Taifersar Arahesis report at bugs.python.org
Sat Jul 17 07:00:39 CEST 2010


New submission from Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>:

distutils.dir_util.mkpath() is used to create a directory and is supposed to not fail when this directory already exists.
There's a chance that another process will create this directory between os.path.isdir() check and call to os.mkdir().
This was reproduced by a Gentoo user during parallel installation of Python:
https://bugs.gentoo.org/show_bug.cgi?id=311437

I'm attaching the patch.

----------
assignee: tarek
components: Distutils
files: distutils-dir_util.patch
keywords: patch
messages: 110538
nosy: Arfrever, tarek
priority: normal
severity: normal
status: open
title: Race condition in distutils.dir_util.mkpath()
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file18036/distutils-dir_util.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9281>
_______________________________________


More information about the New-bugs-announce mailing list