The funny thing is that I was literally just wondering about how shells are implemented right before getting on HN. Thanks for sharing, this should prove most useful :)
It covers a lot of stuff in an authoritative way. For example, how one should implement a daemon properly (e.g., chdir to root to allow for unmounting the disk the program originally ran from, lots of stuff like that). I'll actually doubly recommend it, because it's so good.