◐ Shell
clean mode source ↗

Message 109465 - Python tracker

You are right, but this bug could be easily avoided by using one of the suggested solutions. In my experience a fix sized buffer (whose size is MAXLPATHLEN - or 1024 if not defined) is usually passed to getcwd and the errno is propagated back to the caller if the result is NULL.

While getcwd() is buggy on solaris I think it's not the correct behavior from python to get to an infinite loop and eat up the memory.