This website requires JavaScript.
Explore
Help
Register
Sign In
system
/
glibc
Watch
3
Star
0
Fork
0
You've already forked glibc
Code
Issues
Projects
Releases
Wiki
Activity
glibc
/
sysdeps
/
unix
/
sysv
/
linux
/
dl-getcwd.c
2 lines
20 B
C
Raw
Normal View
History
Unescape
Escape
Fix Linux getcwd for long paths The getcwd syscall (so far?) can only handle path up to one page in size. There is no limit about directory hierarchy depth, though, and the POSIX getcwd is supposed to handle this. In that case fall back to the generic getcwd. Additionally, optimize the generic getcwd to use openat when possible to change the asymptotic performance from O(N^2) to O(n).
2011-05-08 08:37:19 -04:00
#
include
"getcwd.c"
Reference in New Issue
Copy Permalink