s3-prefork: add a few more utility functions