Clean up POSIX.1 implementation of truncate.
Fix stub setrlimit implementation.