If we're on non-Linux, we can use some portability fallbacks to get similar behavior to Linux. I'm sure we can optimize this a bit more for FreeBSD if someone with that installed wants to come look at things and improve them.