Polish off some rough edges with previous fixup.

1. Add close(2) calls everywhere that I touched to consistently close
file descriptors after use (even though the OS, which should be POSIX
compliant, should clean up the file descriptors on exit).
2. Add a missing exit(3).

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
4 files changed