Implement read2 and write2 so we can pass handles between processes