tberghammer accepted this revision. tberghammer added a comment. This revision is now accepted and ready to land. Looks good. You might want to print the errno a bit better but I am fine with the current implementation as well. http://reviews.llvm.org/D22039