Miscellaneous utils based off the POSIX implementation.