Thanks for the link. The original implementation of getcwd resolving .. until it loops is a delightful piece of cleverness I wasn’t aware of.
This type of simple, clever design is what’s prompted me to pick up “the unix programming environment”, though I’m sure most of what it talks about it outdated. It’s been a fun read so far!