[issue2722] os.getcwd fails for long path names on linux

Neil Blakey-Milner report at bugs.python.org
Sat May 10 15:38:17 CEST 2008


Neil Blakey-Milner <nbm at nxsy.org> added the comment:

This affects OS X too.

I'm attaching two patches - one uses malloc to build a bigger string if
the existing implementation returns ERANGE, and the other one uses
malloc from the start.  This was done on the theory that stack memory
use would be better/more efficient.  However, based on testing, there's
no real difference - 16.8usec vs. 17usec - on a rarely-used function.

----------
keywords: +patch
nosy: +nbm
versions: +Python 2.5
Added file: http://bugs.python.org/file10240/python-getcwd-dual-strategy.patch

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2722>
__________________________________


More information about the Python-bugs-list mailing list