I put this aside for a while, but realpath without procfs was one of the things I wanted to get in this release cycle, and I had it essentially finished back in September. Here's the latest version. Compared to the earlier draft, it handles // more consistently (//. and //.. both resolve to //) and expands getcwd only as a final step if needed, rather than doing it first. In the case where an absolute symlink is reached via a relative path, this saves a syscall, avoids repeated absolute path traversal at each step, and avoids spuriously erroring out with ENAMETOOLONG when the working directory is deeper than PATH_MAX but the absolute link target has a valid absolute pathname. To recap, the motivation for the rewrite without procfs dependency was having things work before procfs is mounted or in chroot/namespace where it's intentionally unavailable. I originally considered keeping the procfs based version and only using the new one as a fallback, but I discovered there are cases (involving chroot, namespaces, etc.) where the answer from procfs is wrong and validating it requires basically the same procedure as implementing it manually (walking and performing readlink on each path component). Rich