This is a brute-force approach to issue #102. This might be a bit too much. I don't know if we can clobber errno for all of those?