POSIX compatible safe file count

See <https://en.wikipedia.org/w/index.php?title=Fork_%28operating_system%29&oldid=556414409#Importance_of_forking_in_Unix>.