As of this posting, chdir(2) is now following symbolic links. As per the man page, this is NOT what it is supposed to do. As a small expansion to what Quinn said, it's also not clear to me how the system could work if it DIDN'T follow symbolic links. Theoretically, you could expect everyone to call realpath() before calling chdir, but the file system is an inherently unstable collection of race conditions[1]... so correctness would actually require looping between realpath & chdir until timing worked out such that you got a realpath[2] that happened to not include any symbolic links. UNIX's broad semantic is to make symbolic links as invisible as possible, which allows apps that choose to ignore their existence without any additional effort. You can imagine a system that didn't work that way, but the APIs for that would look much more like how bookmarks are handled than the way symbolic links work. [1] Many apps, particularly command line tools, are written in a way that ignores this rea
Topic:
App & System Services
SubTopic:
Core OS