Related to this, if you've ever built/run anything on Solaris, you probably found out the hard way that even in modern times, fdopen() in 32-bit apps only allows up to 255 fds because they oh so badly want to preserve ages old ABI. Funny bug to hit at runtime in production when you aren't aware of this compatibility "feature".
I learned the hard way that MySQL creates a file descriptor for every database partition you create. Someone had a script that created a new partition every week...
Augh. I ran one of my servers hard into that wall, and now it's something I watch. At least I learned from that mistake.