Skip to content


Subversion checkout URL

You can clone with
Download ZIP


race condition creating directories in parallel #2

dominictarr opened this Issue · 1 comment

2 participants


If many parallel calls are made to makedirp, there is a possible race condition.

say your creating testdir/data/apps and testdir/data/log. the mkdirp call for data/apps sees that data doesn't exists and then the mkdir call for data/log sees the same. Both start to create the directory, but one of the two fails because the other already created the data dir. The failed mkdirp call returns directly and the other just creates all subdirs.

hmm, needs to check if there the error is that the directory already exists.


Wrote a test. All fixed.

@substack substack closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.