some c++ wrappers for posix functions