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 neologix
Recipients amcnabb, hynek, neologix, r.david.murray
Date 2012-05-17.16:35:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
> I guess this is the magic in mkdir -p:
> mkdir("expert", 0755)                   = -1 EACCES (Permission denied)
> chdir("expert")                         = 0
> mkdir("tmp", 0755)                      = -1 EEXIST (File exists)
> I'm not sure how I feel about that. I think we have more or less a policy in os & shutil not to change directories unless really necessary (like make_archive).

Calling chdir() should be avoided, as it is not thread safe.

Actually, the real problem is that stat() alone doesn't trigger
automount, to avoid mount storms e.g. when using find, see:

Since calling chdir() is not an option, if we want to fix this, I
guess the way to go would be to open() the directory, and not use

But I find really uncomfortable with adding such a kludge, especially
since this problem is probably present in many different places
throughout the stdlib.

Furthermore, it seems that kernel from 2.6.38 do trigger automount
upon stat() (see, so
I'd suggest to drop this as "won't fix".
Date User Action Args
2012-05-17 16:35:21neologixsetrecipients: + neologix, amcnabb, r.david.murray, hynek
2012-05-17 16:35:20neologixlinkissue14702 messages
2012-05-17 16:35:20neologixcreate